IBM interview question

Basic String Manipulation for DSA Round and apart from that Logical Thinking Ability