A bit of context: I'm 3rd year PhD in CS. I had a few years training for competitive programming but I never made it. The problems seem to be unintuitive to me and I was never able to solve hard problems in either training period or Leetcode.
Always thought Leetcode is just a way for them to gatekeep a well-paid job.
But now I understand.
My Phd requires me to try to solve problems by synthesizing knowledge from academic papers. And I also had a hard time trying to solve it :) (like solving hard problems in Leetcode).
Recently, I've tried to get back into Leetcode to get internships for PhDs.
And the realization comes to that solving Leetcode problems is a really good proxy to see how a person tries to solve hard problems in life. And the results to come with it requires certain skillsets that can be trained to solve harder problems.
Things I've learned to make progress in Leetcode
Problem solving mindset: Leetcode are just problems. Try to solve it in many ways you can. It doesn't have to be intuitive. If I read something that can be able to solve the problem, then try it!
One problem at a time: Focus on reading solutions and techniques that can help you solve the one I'm doing. If I can't solve it today. I try it again tomorrow. Deep focus on solving one type of problem makes me memorize the pattern and the solution better. Finish what I started is important.
Solve in progression: Each hard problem requires a series of small problems that require thoughts and problem solving tweaks to solve it. Leetcode these days breakdown hard problems into easier ones. For example: This easy one is a good stepping stone to help I know the basis nature of the problem. Then when I solve this one, just one or two more ideas or tweaks to make it work for the Medium level. Slowly my skill can start breaking a hard problem down to easier ones and solve each of them.
Just some of my thoughts on my journey through recruiting hell. It's both suffering and joyful. So I try to make the bright side of it more enjoyable.