Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(startIndex == endIndex)
- {
- return board[startIndex];
- }
- else if(board[startIndex+1] < board[startIndex+2])
- {
- return board[startIndex] + jumpIt(board, ++startIndex, endIndex);
- }
- else if(board[startIndex+1] > board[startIndex+2])
- {
- if(startIndex == (endIndex-1))
- {
- return board[startIndex] + jumpIt(board, startIndex+1, endIndex);
- }
- return board[startIndex] + jumpIt(board, startIndex+2, endIndex);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement