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.
publicstaticStringgamingArray(List<Integer>arr){// Write your code hereString[]ar={"BOB","ANDY"};intcount=-1;intzeroIndexElement=arr.get(0);Collections.sort(arr,Collections.reverseOrder());System.out.print(arr);for(Integera:arr){++count;if(a==zeroIndexElement){break;}}System.out.println(count);count=count%2;returnar[count];}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Gaming Array
You are viewing a single comment's thread. Return to all comments →
some test cases are not passing