Nagarro interview question

Coding Round Ques 1- Charater Encoding Decoding