Binary Search Algorithm In Java | FREE DSA Course in JAVA | Lecture 48
Vložit
- čas přidán 26. 07. 2024
- We are learning about the searching algorithms in arrays. We have covered linear search algorithms in the last class and now we are going to learn about a very common and more effective search algorithm ie. Binary search.
Before moving to binary search, let's take a more practical example of search from our day to day lives.
How do you search for a number in a dictionary. Say you have to search success in a dictionary.
The linear search algorithm approach will be that you will start from will work starting with a and go in a sequential manner but surely it will take a lot of time and no one will do that.
We know that success start with s and hence we'll randomly attempt to open the dictionary and many we get c. Surely s is ahead of c and hence you will now search ahead of c.
The next time you may get t and hence you'll limit your search before t obviously.
What you are actually doing is shortening up the scope of search until you arrive at s and ultimately will find the word success.
This is what we need to do in a binary search. We need to shorten our scope of research with every attempt in a binary search algorithm.
Let's see how we can actually write a program to cover this binary search algorithm approach to search an element in an array in Java.
Watch the complete lecture to understand the binary search algorithm.
Subscribe to our channel for regular updates on the dsa course and click on the bell icon to never miss an update from our dsa course.
Data Structures and Algorithms Free Course (Learn DSA Without Paise) Playlist - • Data Structures And Al...
For more information, fill this form: forms.gle/8eiUmM92Fx563Aen9
or call us at 8884881203
Facebook: / thetapacademy
Instagram: / tapacademy_online
Linkedin: / 73820805
Website: www.thetapacademy.com
#dsa #dsacourse #java #dsainjava #javaprogramming #coding #coder #recursion #placement #array #arrayquestion #arrayjava
Greattt❤
Everyone just describe the coding but you describe the process behind the logic. Great tutor
What a great lecture 💯😍
I am mechanical student with no any programming knowledge but i understand this whole concept due to way of your teaching😇
I also ❤
Great explaination of cod 👍
Very nice explanation sir it cleared my doubts of week🎉
Fantastic sir first time in my life i understand binary search thank u very much
Way teaching is extremely beautiful
good teaching
This channel deserve more❤
Osm explanation 🎉🎉
Beautiful explanation brother . Very well correlated with dictionary example to make it clear appreciate it
Thank you bhaiya I am in class 10th and your videos are literally helping me a lot during my cts board exam gap holidays
Being a commerce background guy have been struggling with this question for 2 days on different youtube videos and chatgpt but finally I understood it here due to your marvellous explanation...
what a teaching sir thanks for video
lov u so much annaa. understood so welll !!!!
you are such a great teacher.
seriously you are great man
very good video sir😍
great video! Thanks alot sir
Amazing explanation and editing 🛐. Thank you so much bhaiya for this beautiful explanation. Keep going❤️
One doubt....when low value is greater than the high value(5>4)...why the element was not found there?
very cool thank
He is best
waah ji😍
great explanation!!!! and editing !!!!
U look like KL.RAHUL (indian cricketer) 🤩♥️
perfect
Hi, program which you have shown is not working for element not found case. mid index must be mid = low+(high-low)/2.
He is Better than my damn lazy instructor lol
Where is the complete course? Could u plz tell!
Why u not uploading now sir videos
sir please make a playlist for C language deaply
Will come up with it after the dsa course.
I am facing a lot of problems to build my logic please help me sir
There's a video on the channel. Do check it out.,
please sir reply me or suggest me