How To Debug Your Code | How To Solve Any Coding Problem In Your Interview Part 3

preview_player
Показать описание
I am really happy with the channel growth, and thus want to give something back to community :)

3 Lucky draws will be chosen Randomly:
1st lucky draw prize winner - 1000 INR
2nd lucky draw prize winner - 600 INR
3rd lucky draw prize winner - 400 INR
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
In this video we will learn how to debug your code. This is one of the most important part which many people miss. They just assume all is gonna be well, but thats not always the case with Interviews. You must have an action plan in case the code you have written doesn't work.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

------------------------------------------------------------------------------------------
Here are some of the gears that I use almost everyday:

PS: While having good gears help you perform efficiently, don’t get under the impression that they will make you successful without any hard work.
Рекомендации по теме
Комментарии
Автор

As per my experience, I will tell you to do a dry run using pen and paper. The interviewer does not mind using the notebook for a dry run, they even promote you to do that. A dry run can help you to understand where things are going wrong, instead of using mental model for debugging.

ManishKumar-rzub
Автор

Next time we will remember these things (Btw I am already applying some of them😉😉) :
1. Checking code output using the "Custom input button and through Dry run".
2. Using of print technique.
3. Stub (Write down manually the expected value in place of the function call )
4. And by commenting some part of code

abhishekvishwakarma
Автор

sir, please make a series on TREE GRAPH
please sir we have urgent need of this...either give at least short intro

amitazadi
Автор

I am currently seeing your DP series and just barged in here to tell you how great of a job you are doing. Lots of love.

AK-sqyi
Автор

Bohot correct chij btaye bhaiya 💯💯❤💥, loved it

roushanraj
Автор

Last one in your gears was really helpful😂😂😂

aaryasrigurudattadarsi
Автор

The idea is to narrow down the problem.

Most of the time, in a live coding inteview, if you directly jump into the code, or if you do not have a habbit of running your logic on a whiteboard/paper, you would land into logical problems. So, first make a habbit to run your logic in pen and paper.

If logic is fine, then check for expected output on parts of your code, it happens that sometime you expect the elements to swap, but nothing happens.
so, printing helps there.

Never tried the stub step myself, but usually if it's array indexes or dynamic memory, either you'll get wrong answer or seg fault, so narrow down even more.

PabitraPadhy
Автор

Thanks man! I have a test tomorrow was eagerly waiting for this!

definitelyacat
Автор

Nice Explanation
Bro, Can you make a series on Graph because it's a very Important Topic and no one has taught the graph in perfect order. If you can please make a series on Graph.

yashbodhe
Автор

22 min ki puri video dekhne se phle hi sab comment kr dete h... including me...

shiv.isolate
Автор

Thanks bhai Your Heap lectures played a very important role for me to get into Optum

yeeroj
Автор

bhai ek isi series ke part 4 banao ki kitna competitive ka practice chahiye, chahiye bhi ya nhi, ya bs ds algo gfg/leetcode se hi coding rounds aur interviews nikal jaenge . Tumne kya kiya tha wo bhi share kro

mickyman
Автор

March- Asking for graph playlist
November- Asking for graph playlist
And the wait continues😭😭

raviashwin
Автор

you are the best teacher in the world, please please make more series on any topic .

Pawan_Kumar_Mehta
Автор

1.Use the dry run you have done using pen and paper.
2.Use custom ip and op.
3.Print in between
4.Stub some functions.
5.Comment some lines to find overflow/segmentation fault.

saikumargatla
Автор

Please add more videos in the dp playlist, it is best dp playlist on the internet. Got tremendous help from it. Thanks a lot.

subhammitra
Автор

This is exactly how doctors treat patients as well. Narrowing down the source of trigger..mostly its harmless guesswork.

alphabee
Автор

My code passes the test cases for one of the known given example but fails for hidden test cases 😂😂

yogeshs
Автор

agr mai interview mai hu aur koi idea nhi lag rha toh minimum mai esa kya batau us problem se related Interviewer ko ki wo fully disappoint na ho

rishabhgautam
Автор

Bhaiya please tree and graph be start kardo ✌👍 thanks for such videos✌

umanggoyal
visit shbcf.ru