5 Problem Solving Tips for Cracking Coding Interview Questions

preview_player
Показать описание
Here are 5 of my favorite problem-solving techniques for solving any coding interview problem!

For improving your problem-solving skills, as I mentioned in the video, I recommend the following two pieces of resources:

And you should follow me on IG if you haven’t yet :)
Рекомендации по теме
Комментарии
Автор


Also, for improving your problem-solving skills, as I mentioned in the video, I recommend the following two pieces of resources:

See you guys in the next video!

CSDojo
Автор

Besides everything related to coding and thinking, I really like the way that on clicking the dotted box bursts to display what's inside.

simranray
Автор

To everyone who understood this video, I'm happy for you. I'll get there soon.

Update: I'm working as a Software Engineer in Toronto. Keep working hard, one day it'll pay off 👊🏼⚡️

SV
Автор

Tip #1: Come up with a brute-force solution - 1:23
Tip #2: Think of a simpler version of the problem - 2:34
Tip #3: Think with simpler examples -> try noticing a pattern - 5:54
Tip #4: Use some visualization - 10:10
Tip #5: Test your solution on a few examples - 15:09

MonsieurCHING
Автор

The moment your best solution is the brute-force one.
1:32 This pair, Dis pair, Despair.

neutral
Автор

Here's a solution that is also O(nlogn), but faster than the one you provided:

Sort array 1 (nlogn). Now, for each value x of array 2, conduct binary search on array 1 to find the element closest to (target -x). This should be nlogn as well.

Your solution requires 2 sorts and extra processing, but this one only requires one sort.

asishbalu
Автор

High quality as always, man. Thank you for your good work. I learn a lot with your videos.

joaovfeijo
Автор

Just a thought.



The question is that if the interviewer has not seen or practiced a given problem, will they still be able to solve and evaluate a candidate? The problem of these kinds of interviews is that the interviewer and candidates are not on equal ground. When the interviewer clearly knows the answer, it becomes somewhat biased when they attempt to judge their candidates (by asking things like, can you think of a better solution to this and so on, notice the keyword "think" not "recall").

I guess my point is that I don't quite believe the interviewer can always improvise a solution to problems such as finding the total number of subsets of integers that add up to a number or a cell automata problem with lots of recursions. I believe they can probably solve it by sitting quietly by themselves and tackling the problem without a time limit or without people watching them, but the question is that can they "think from the scratch" themselves? Do you code under pressure with people watching you and judging you?

You don't see this kinds of interview in other industries such as EE, physics, chemical engineering, etc., because there's no way to ask you to design and implement a VLSI chip that functions a certain way or design a quantum mechanical system on the scene. But somehow in CS, this is convenient. Very often you interview for a machine learning position but people only, or to a large extent, focus on trickery coding problems; almost as if statistics and math are not as important; kind of going backwards, imho.

Let's have an open research question, so that neither the interviewer nor the candidate has a viable solution at the moment. Then, we both try to solve the problem or come up with a tentative solution, in which case you'll also get to see how the candidate approaches the problem, their patience, their analytical capacities, personalities and so on. But at least, this interview process would be less biased.

When people practice a lot of these coding problems and then go ahead to have an interview, they are really just "recalling from memory" on how to solve certain problems but you are not really testing their "analytical abilities."

bpc
Автор

Great buildup from vague idea of how to do it, to coming up with a way to traverse that grid. Really cool.

Seawolf
Автор

The most awesome explanation I have ever heard! Thank you, Dojo

haroldwran
Автор

This is brilliant. Thank you so much for this. Easily the most detailed and clearly articulated and digestible, general approach to solving algorithm problems.. While watching youtube videos on algorithms, so many of the people solving them just seemingly grab the solution out of thin air. No doubt this is due to them doing a ton of algorithms in the past, recognizing patterns and reaching for solutions or similar solutions that worked for them in the past. The problem with this for people newer to solving algorithms is as I mentioned - this seems to come out of thin air and doesn't help, because it doesn't show the thought process behind what came up with the original pattern that they're grabbing for.. hope that makes sense and thanks again for the video.

xzist
Автор

Thank you for clear and concise explanation with visuals. Keep up the good work

aznthanh
Автор

These tips are amazing!! The final solution amazed me, I just recently failed an interview for an intership at one of the big 4 and im determined to study at least 2 hours a day for my next one, I hope you make more videos like these!

cachorito
Автор

I really really enjoy your videos, problem solving the most, i hope your channel covers more about problem solving and competitive programming

naserdakhel
Автор

A great video! This is one of the best explanations on the thinking process behind solving algorithm problems. Thanks for sharing!

johncodeinaire
Автор

Regarding your last solution: if there are two equal numbers in one of the arrays you start with then I think this approach could lead to a problem. In your grid-like visualization there would be a line (or row) where there are two equal numbers next to each other. Now say your target number is 17 and you hit a spot where there are two 16 next to each other you could ignore the second 16 that sits to the right of the one you are checking - so i think when you ignore the space next to the number you were checking you have to first check if the neighbouring numbers are really smaller or am I missing something here.

andreastischler
Автор

Learnt so so much in this video alone. Thanks a lot for this high-quality content ❤

thrishmareddy
Автор

You are brilliant.
Thanks for the knowledge sharing and innovating problem solving skills

achanoch
Автор

thumbs up...want more videos on problem solving techniques. And congratulations to you man, my friends liked your channel too after I suggested them.

Shubham_Singh_India
Автор

You are genius, thanks a lot for your tips. It really helped me, keep on posting these kinds of videos!

harishkandikatla