Hi, everybody. I just found that I'm getting stuck on almost EVERY problem that wants to output the maximum operations X to make that array A to X in different templates.
I tried simulation which I found out it's impossible for larger inputs.
I even asked chat gpt, but the results were not acceptable. Can anyone help me is there any fixed way to think about these problems? or a way that might help solving them?
Thanks.








Auto comment: topic has been updated by Taha90411 (previous revision, new revision, compare).
This is not a topic per se as you can disguise different problems into "operations" framing. Min. operations to make array A sorted and min. operations to cut and paste from B to make A = B are two very different problems.