Digit Insurance Interview Question

reverse a string in online compiler and run the code