Sponsored
Use these hints if you're stuck. Try solving on your own first.
Think of the line as a graph
to handle the no double back jumps condition you can handle it by holding the state of your previous jump
Solve with full IDE support and test cases