Capgemini interview question

OOPS concepts Strings DSA question