Infosys InfyTQ Practice Problem – 1 | Four Digit OTP

Problem Statement: You will be given a number in the form of the string, extract out digits at odd index then square and merge them. The first 4 digits will be the required OTP which shows as output. If 4 digit OTP is not generated then give output -1.

📢 Need further clarification or have any questions? Let's connect!

Connect 1:1 With Me: Schedule Call


If you have any doubts or would like to discuss anything related to this blog, feel free to reach out to me. I'm here to help! You can schedule a call by clicking on the above given link.
I'm looking forward to hearing from you and assisting you with any inquiries you may have. Your understanding and engagement are important to me!

This will close in 20 seconds