Frage im Vorstellungsgespräch bei IBM

Write a program to take input as a string and do manipulation like reverse it ,pattern matching etc