Pergunta de entrevista da empresa Arista Networks

Q: given an array of numbers select maximum and reduce something from it and put the modified number in array again . The minimum number of steps to consume all the numbers was asked.

Resposta da entrevista

Sigiloso

5 de mai. de 2021

I used priority queue to select and modify the max. Using a simply condition on sum we can terminate the process.