Solving array problems can sometimes be very tedious and TLE for even simple problems is annoying. You might have faced this as well, right? I spent quite some time figuring out the optimal solution for the problem statements, then I came across some...