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.
classResult{/* * Complete the 'cookies' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. INTEGER k * 2. INTEGER_ARRAY A */publicstaticintiterations=0;publicstaticintcookies(intk,List<Integer>A){Collections.sort(A);inta=A.get(0);intb=A.get(1);if(a>=k&&b>=k){returniterations;}A.remove(0);A.remove(1);A.add(a+2*b);iterations++;returncookies(k,A);}}
Jesse and Cookies
You are viewing a single comment's thread. Return to all comments →
What's wrong with my code please??