An array of positive numbers is reduced by repeatedly picking two positive elements a and b: the larger-or-equal one receives their sum and the other becomes -1, until one positive element remains…
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.