Tech Mahindra interview question

String related question like reverse a string count the length