Help in greedy problem !!!!

Revision en1, by ayush29azad, 2021-09-21 08:53:56

Problem Link :

Can someone help me in solving this greedy problem ????

I thought of 2 passes left and right and storing max and then changing the elements and then comparing the sum of both sides(left and right) but it is not working , Can someone suggest a good approach to solve this problem. There is no tutorial for this problem .

Thank You in advance.


  Rev. Lang. By When Δ Comment
en1 English ayush29azad 2021-09-21 08:53:56 448 Initial revision (published)