Bank of America interview question

Questions on string manipulation, oops and puzzles