How Many LeetCode Questions Should I Solve?
A lot of programmers have probably started to actually despise these complicated (and dull) algorithms because of the notion that they are necessary to understand in order to pass interviews.
I used to practice solving algorithmic problems on one of the most well-known sites, LeetCode, myself. To be clear, my goal in doing this was not to prepare for an interview. Moreover, I was well aware that this kind of problem-solving differs greatly from what developers do on a daily basis. Still, I soon observed that some of the gaps in my knowledge began to close.
1. Greater focus, less bugs
It’s really helpful in our area of work to form the habit of asking yourself questions such as “Will my function fail when the input data is too large? What occurs if it is empty?
I particularly enjoy LeetCode issues since they kind of compel you to think about, if not actually code, many scenarios for possible test cases. The platform offers test coverage for a wide range of negative situations and instances with a big input (of course within the limitations) in addition to simple, typical scenarios.
2. Developing answers and creating code more quickly
After approximately six months, I was pleasantly delighted to find that my pace had improved — something I hadn’t anticipated.
How? Common patterns and methods of tackling them still emerge even when dealing with a wide range of jobs. A excellent example is going through a binary tree; you could build this method with your eyes closed even after working on those issues intermittently for a few months.
Context for Beyond cramming for job interviews, solving algorithms
Beyond cramming for job interviews, solving algorithms
Beyond cramming for job interviews, solving algorithms
30 March 2023Bits and Bytes
Also also
Beyond merely coding speed, I also observed a speed boost when selecting a problem-solving strategy. (As an illustration, you may attempt to sort the array’s input data first if the problem is unclear.)
3. Have no fear of difficult jobs; simple ones are simple.
Once more, my goal is not to persuade someone that understanding algorithms is a need for their line of work. Yes, it could be required for those that work with sophisticated materials and optimizations.
Having said that, there have been a few occasions in the last year as a front-end developer where I have had to employ difficult, non-trivial techniques. (The client-side graph visualization scenarios were the greatest challenge.)
Even though it wasn’t a common occurrence, I think I would have been a little more nervous and wasted more time (and nerves) if I had run into issues like that prior to my year at LeetCode.