Bjak interview question

String problem and was open internet