3 ms·
I completely agree about leetcode lacking a technique map/graph/tree. This would be immensely useful. In my studies I found that I naturally gravitated to class
by yourabstraction 6y ago
I completely agree about leetcode lacking a technique map/graph/tree. This would be immensely useful. In my studies I found that I naturally gravitated to classes of problems I was already good at, because that way I could avoid the mental pain of learning new techniques. I really needed a roadmap that lead me to what I actually needed to study, and that showed me where I was strong and weak. But as you said, they never make it super clear which techniques a problem uses, and how those techniques build on and relate to other techniques.
I'm really glad you bring it up, because I had actually been pondering ideas for making a better programming training site based on the idea of a skill graphs (similar to an RPG), repetition to build muscle memory, clear progress tracks based on the graph of skills, and greater insight into your strengths/weakness/progress with metrics.
As far as enumerating techniques, I'd need a good deal of time to work on that. I think there are two classes, the macro, being data structures/algorithms and what type of problems they apply. And the micro, which is more implementation specific techniques. Things like using a loop with two pointers into the same structure (ie: find a cycle in a linked list).
- gofreddygo 6y agoWell thanks for your comments. Feels assuring knowing I'm not alone (although clearly in the minority) waving my hands at how crude and ineffective the common advice to "do leetcode" really is. That training site idea sounds exciting, much better than what exists today. The key perspective shift from me was from - "I need to solve 200 leetcode problems before I can approach interviews with confidence" to - "Here are 50 techniques. Most solutions use a combination of these" I started my journey splitting things into buckets (Arrays, Strings, Binary tree, BST, Stacks, Linked List, Matrix, Graphs, DP). I went through EPI and Leetcode populating those buckets. I started solving the easies for a month. Built a repo of questions and links so huge, it would take me years (really, years) to get through it sequentially. That was depressing and with no sense of immediate reward, gave up. A few weeks later, I decided to reduce scope and focus only on Arrays, Strings, BST and Graphs. Turns out that isn't a great approach either as there are a lot of overlaps between Array and String problems and by the time I got to the string problem that used a technique similar to what I had used in a problem in Arrays, i'd forgotten most of it anyway. Repeated this a few time and it gave me the impression that I couldn't remember shit, I wasn't cut out for this and gave up, again. My latest attempt is to focus on data structures (properties, strengths and tradeoffs) and techniques. This has been liberating so far but is a lot of work which drove me to look for resources adopting such a perspective and I found none. I believe its probably a lot of work (like you mention) but I wouldn't know unless I get through more problems. ¯\_(ツ)_/¯
- yourabstraction 6y agoYeah, it's really easy to get overwhelmed by the raw amount of stuff to study. I found I just needed to be consistent, and get through 3-5 leetcode problems a day, while trying to force myself to hit the problems in areas I was weaker. If I tried to enumerate everything, I quickly became very overwhelmed like you describe. I think if you hit a balance of problems that touch on arrays, strings, linked lists, trees, graphs, stacks, queues, heaps, and also some dynamic programming you'll be good to go. I found that companies really love to ask graph problems in disguise, and once you know how to recognize them and the basic DFS/BFS implementations you're golden. And if you get good at graph problems, trees and linked lists are simple, so I think it's a great area to put extra focus. I found the dynamic programming problems particularly hard for my brain to grasp, and I had to spend a lot of time repeating the basic problems and slowly building up my skillset. A ton of practice, and I never even got asked a single DP question in all the interviews!
- gofreddygo 6y agoThanks that's solid advice. I imagine that strategy ( focus on weaker areas and be consistent) to work more reliably than making it a numbers game. Appreciate your comments and hope you can see that training website through to a real product. Would benefit a lot of people like me.