We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Java 1D Array (Part 2)
Java 1D Array (Part 2)
Sort by
recency
|
620 Discussions
|
Please Login in order to post a comment
import java.util.*;
public class Solution {
}
//Right code
return canWinFromPosition(leap, game, 0); }
pls follow for better code and message for the answer for all type language coding
My Solution: // Return true if you can win the game; otherwise, return false. if(index < 0 || game[index] == 1) { return false; } if(index +1 > game.length-1 || index + leap > game.length-1) { return true; } game[index] =1;