Permutation game Discussions | Algorithms | HackerRank
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.
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;
}
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Permutation game
You are viewing a single comment's thread. Return to all comments →
I could ot understand what the function should do. here is my Java function