Dear,
Write a function that takes a list of integers as argument and calculates how you can 'jump' in this list. Take for example the list
List(4, 0, 4, 0, 1, 0, 2,1)
The integers stand for how many "steps" you can jump forward. The first 4, for example, means you can jump to one of the next 4 elements, that is 0, 4, 0 and 1. If you land on a field that contains 0, then you are stuck, or cannot jump any further. If you land on a field with a 1, you can jump only to the next field. If on 2 you can jump to the next field or the one after that. I guess you get the idea.
The point is can you calculate for any list how many jumps you need minimally to jump to the end of the list. I think for the list above you need at least three jumps 4 => 4 => 2 => end-of-list . This should be a nice search problem which you can implement as recursive function.
Thanks,
Hello Sir,
I am Nikunj Prajapati. Having several years experience in the industry, I strongly believe I can make a significant contribution to requirement.
If given the chance, I am confident that I could meet your algorithm development needs. Therefore in view of all of the above I would be highly gratified if you consider me for this important position.
Hi, I have code for this project/problem available in Java language already. I can submit you the code immediately if I am awarded the project. Also, I have bid at a very low price. After submitting the work, if you are not fine with the code, you can take away the project anytime from me. I am basically a Java Developer with 6+years experience in an MNC. I can also provide you the code in scala, but need sometime to rewrite the code in scala/spark. Hoping to work with you! Thanking you in advance!