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...
Top Amazon interview questions & answers
Top HR questions asked in Amazon
Stay ahead in your career. Get AmbitionBox app
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
Get AmbitionBox app