General tips for solving coding challenges
Table of Contents
3 things you shouldn’t do when solving coding problems!!!
When I started solving DSA, I made these 3 mistakes a lot, wasting a considerable amount of my time.
So, we should definitely avoid these while practicing DSA.
- I used to spend very little time understanding the problem statement.
- At times, when I couldn’t devise or think of an approach, I would directly look into the solution.
- I gave up many times when I was stuck on a problem.
While talking to students, I noticed that many others also make the same mistakes. Some give up because they believe they can’t solve any problems by themselves.
The solution to these problems is quite simple.
- Spend at least 15-20 minutes trying to understand the problem statement properly.
- Don’t jump directly to the solution. Instead, first look at the hints and then try to solve it again. If you’re still unable to solve it, then just look at the approach and implement it by yourself. And even if you still can’t solve it, it’s no big deal. It happens to all of us.
- Never give up, especially when you can’t solve the problems.
Some Tips for Coding Interviews
- There is no better way to do well in Coding interviews than practicing as many coding problems as possible. This will not only train your mind to recognize algorithmic patterns in problems but also give you the much-needed confidence to solve the problem you have never seen before.
- My second tips are to learn about as many data structure and algorithms as possible. This is an extension of the previous tip but it also involves reading and not just practicing. For example, If you know about the hash table you can also many array and counter-based problems easily. Same is true for tree and graph.
- Choosing the right data structure is a very important part of software development and coding interview and unless and until you know them, you won’t be able to choose.
- Time yourself — candidates who solve interview problems within the time limit and quickly are more likely to do well in the interview so you should also time yourself.
- Think of edge cases and run your code through them. Some good edge cases might be the empty input, some weird input or some really large input to test the boundary conditions and limits.
- After solving the problem, try explaining it to a friend or colleagues how is also interested in coding problems. This will tell you whether you have really understood the problem or not. If you can explain easily means you understood. Also, the discussion makes your mind work and you could come up with an alternative solution and able to find some flaws in your existing algorithms.
- Another useful tip to excel Coding interviews is to appear in the coding interview and lots of them. You will find yourself getting better after every interview and this also helps you to get multiple offers which further allows you to better negotiate and get those extra 30K to 50K which you generally leave on a table if you just have one offer in hand.
- Btw, If you are ready for Coding Interview then you can also take TripleByte’s quiz and go directly to the final round of interviews with top tech companies like Coursera, Adobe Acrobat, Dropbox, Grammarly, Uber, Quora, Evernote, Twitch, and many more. I didn’t know about Triplebyte before, but they are providing a great service to job seekers. A big thanks to them.