I come from somewhat mathematical competitive problems background.
Usually, I would solve stuff by turning it into an algebra problem. Solve an equation or prove some equality which implies what the problem wanted. Yes, even geometry. And yes, my peers considered that utterly disgusting. I did find it nice tho, when all the terms cancel out and the variables match up.
This is my way of thinking. And I applied a similar one when I did coding problems.
There was a problem once at BAPC or NWERC, which was like, give a radius R, find the number of integer lattice points inside the circle.
It looked like a math problem. Smelled like a math problem. I was sure there was must have been a pattern. There must have been an equation.
I tried to backtrack it from examples which I counted by hand. Countless drawings of grids and circles. Just a waste of time.
And at the end of the competition, a friend of mine said, that they solved it by counting the number of lattices under a single quadrant’s arc curve and multiplying by 4. And that is just equivalent to evaluating the points on the curve, flooring and summing them.
Disappointed, I also learned a first lesson.
Answers in ADS problems are often not explicit. There could be no closed form solution (unless the problem is designed like that). Most likely, the answer has to be constructed.
Lesson two and three, I learned while grinding leetcode in October 2025.
Lesson two is, use the minimum information needed to solve a problem.
Do you really need to use min(...) of an array every time? Comparing all elements? Or do you just need a heap? Which keeps track of the minimum?
And number three was that, most of the harder problems are just solved by combining the methods you learned. Assuming you learned them. Otherwise you’d have to reinvent the wheel, which is really hard. That’s why having solved a lot of problems is a good heuristic of success here. You’ll see enough problems to spot patterns. Eventually, the next problem you get will be a combination of earlier few.