Write the pseudocode to return the max of two numbers in an array
Anonymous
max(int[] a){ a.sort() if(a[0] * a[1] >= a[a.length-1] * a[a.length-2]){ return a[0] * a[1]; } else{ return a[a.length-1] * a[a.length-2] } }
Check out your Company Bowl for anonymous work chats.