Algorithm Patterns - Binary Search

preview_player
Показать описание


Preparing For Your Coding Interviews? Use These Resources
————————————————————

Other Social Media
----------------------------------------------

Show Support
------------------------------------------------------------------------------

#coding #programming #softwareengineering
Рекомендации по теме
Комментарии
Автор

drinking game : take a shot every time I say binary search

NickWhite
Автор

Thanks for touching upon the fact that there are 2 different ways we can compartmentalize binary Search. In my view, candidates usually get confused about when they would use

while(left <= right){...} vs. while(left < right){...}

When we use left <= right, we have an if condition of the sort if(arr[mid] == target).
When we use left < right, we do not have that if condition . Instead we return left value.

The way i get myself to remember it is by running a quick sample input like (1, 2) and try running Binary Search to find target == 1 and when target == 2

I know this is trivial, but this is something that most people overlook

psn
Автор

I love this algorithm pattern series already! Please do more of these for other algorithms!

xinyucao
Автор

This is amazing, this is exactly what I needed to know. I had a recruiter from amazon reach out to me and asked if I was interested in interviewing and I immediately started looking for algorithm practice videos and found this awesome channel, thanks Nick!

mens_essentials
Автор

Was waiting for things like this, absolutely worth subscribing. I am pumped. Waiting for patterns on Array manipulation like bucketing and prefix sums.

swagatochatterjee
Автор

This is dope, thanks for the video! Could you make a video of when to use PreOrder, InOrder, PostOrder when dealing with tree questions? Thanks again!

OverLordOfDardWorld
Автор

Just realized what you were doing, which is introduce algorithm patterns. (It's literally in the title lol) This is insaaaane, make more of these

OverLordOfDardWorld
Автор

By the way... I follow your each and every video... and inspired by you🙂

mohitjain
Автор

I am preparing for DS and Algo for placements. recently gave test on hackerrank for a company but not able to complete the questions. they were implementations questions ? if you want I can share questions with you ?

GauravDwivedi-yriq
Автор

Your explanation help alot to understand problems and patterns. Please do more on pattern series. If possible can you please explain once 'Search in Sorted array' problem. Thank you..

akhileshasare
Автор

You are awesome, can't explain in words but you are best

narendratechguy
Автор

Sir how we predict binary algorithm of Nicholas pattern which we use binary trading???? Please answer me

expertforexandbinary
Автор

This was really a lot. Hope to see some more videos like this.

vasuagrawal
Автор

You're a life saver man! Appreciate the content!

jagr
Автор

Nick can you make more videos about algorithm patterns... btw awesome explanation 👏

abinot
Автор

Your videos will help me a lot....love you nick😁

kavyatsaliki
Автор

Perfect man, keep it up with this series

youssefmuhamad
Автор

Powershell....! Man.... Search on Windows 🤐

mohitjain