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.
static int getMoneySpent(int[] keyboards, int[] drives, int b) {
/*
* Write your code here.
*/
int ans=-1;
Arrays.sort(keyboards);
Arrays.sort(drives);
int i=keyboards.length-1,j=0;
int curr=-1;
System.out.println(keyboards);
System.out.println(drives);
while(i>-1 && jb){
i--;
}
Electronics Shop
You are viewing a single comment's thread. Return to all comments →
static int getMoneySpent(int[] keyboards, int[] drives, int b) { /* * Write your code here. */ int ans=-1; Arrays.sort(keyboards); Arrays.sort(drives); int i=keyboards.length-1,j=0; int curr=-1; System.out.println(keyboards); System.out.println(drives); while(i>-1 && jb){ i--; }