Digit Insurance interview question

reverse a string in online compiler and run the code