Help with tricky array question

Revision en2, by aakarshmadhavan, 2018-06-28 01:18:56

I found an interesting question on another OJ. I'm very bad at these types of questions (any suggestions to improve are also welcome).

486

For you all here this will be easy cake, I appreciate any help you can provide for me.

I tried 2 pointers-greedy, but I realized that the players will not always take the largest values from each of the left/right pointers of the array. I'm very stuck and can't find a way.

Any ideas/hints/suggestions (not too revealing). I really don't want to look up the solution before getting it myself.

Thanks

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English aakarshmadhavan 2018-06-28 01:18:56 1 Tiny change: 'come).\n\n![486](http' -> 'come).\n\n[486](http'
en1 English aakarshmadhavan 2018-06-28 01:18:33 652 Initial revision (published)