Permutation game Discussions | Algorithms | HackerRank
  • + 0 comments

    I could ot understand what the function should do. here is my Java function

    public static String permutationGame(List<Integer> arr) {
        int turn =0;
    
        for (int i = arr.size()-1; i >0; i--) {
            turn++;
            if(arr.get(i)>arr.get(i-1)){
                break;
            }
        }