Given a list of numbers in an array ,traverse the array in a way so as to jump the number of times the value at that particular index example : a[i]=2 then jump to a[i+2] index , on reaching the last index start the sequence from beginning, so suppose i am at index 4 in an array of 6 element and then if a[4]=3 then my position after this jump is a[2] , if i hit any element of array then its a circular array .
AnswerBot
1y
Traverse an array by jumping the number of times the value at that index
Create a loop to traverse the array
Use modulo operator to handle circular array
Jump to the index based on the value at current i...read more
Help your peers!
Add answer anonymously...
Popular interview questions of Module Lead
Top HR questions asked in Ciena Module Lead
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