I've been programming as a hobby for about seven years, starting in middle school, and now I'm in college. I've mainly used C, focusing on personal projects like toy operating systems and compilers. While I've done well in building applications and completing programming assignments, I find myself struggling with LeetCode-style problems in my data structures and algorithms class and during internship interviews. I can often understand solutions after looking them up, but coming up with them independently is a challenge. Is it typical to have such difficulty, and should I consider project-based programming and solving LeetCode problems as separate skills that need different approaches? After all, I can come up with inefficient (brute-force) solutions, but efficient ones remain elusive.
5 Answers
It's totally normal! Just because you’ve been programming for years doesn’t mean the specific skills for interview problems or competitive programming come naturally. Those problems often need a different mindset focused on algorithms and optimizations, so don't stress if it feels challenging.
You're not alone in this! Many people with extensive programming experience find LeetCode problems tough because they involve a specific set of skills. I suggest tackling easier problems and gradually building up your confidence. You don’t need to master everything immediately—just practice consistently!
Definitely! LeetCode problems are a whole different battleground compared to the projects you've done. It's like learning a new sport; it takes practice. Start by mastering brute force solutions before moving on to find optimizations. The patterns will start to appear with time, so hang in there!
Thanks for the encouragement! I'll keep focusing on those brute-force methods and build from there.
It sounds like you're facing a common hurdle. LeetCode style problems often require a formal understanding of algorithms. If you can strategize around your brute-force solutions, you’re on the right path. Consider studying algorithm books, or even joining a study group to share approaches!
It's common to peek at solutions, especially when starting out. Algorithm design comes with experience and practice. Books like 'Cracking the Coding Interview' can provide great insights. Don't hesitate to learn and practice—over time, you'll find your rhythm!

That's good advice! Starting easier sounds like a plan; thank you!