Publicis Sapient interview question

java OOP, SQL, algorithm question with string manipulation