Asked inAmazon,

GIven a infinite series 12345XXXXX1314151XXXXX1... Find the nth character of string (eg 9th character is 9, 10th character is 1, 11th is 0, 12th is 1 and so on...) . Interviewer asked me to code it, including corner cases. He gave me different inputs and asked me to tell output line by line

AnswerBot
1mo

The task is to find the nth character of a string formed by an infinite series of numbers.

  • Iterate through the series and keep track of the position in the string

  • Handle cases where the position exceeds...read more

Help your peers!
Add answer anonymously...
Amazon Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter