Tech Mahindra interview question

String reversal code, OOPs concepts, Data structures