Thanks so much - I have listened to your videos on arrays and passing arrays to functions - now I finally think I get the concepts - the explanations were clear and systematic - keep posting more videos - kudos sir for sharing your knowledge in a way that communicates to the student.
with C++, there is no need for binary search. Just store data into set STL data structure and use its set::find() member function. But thanks for explaining binary search algo.
I have seen the Linear search algorithm you completely figured out for me. Your teaching way is a piece of cake. Watching from Ethiopia. Thanks a bunch.
So basically, we can't do binary search if the array isn't sorted from low to high? Unlike linear search that can do even though if the array isn't sorted (random number)
It was really cool ! But here is the question though : What if the list/array is unsorted ; I mean if there is a large search space , say 50000 elements ; would we be able to sort it manually ? - NO. So, why don't we have a function for sorting too? Thinking practically , there are not gonna be arrays with just 8 or 10 or 50 elements, so i think we need it. Comment down your thoughts on this. :)
you are good at teaching...... i didn't find any video that made it as clear as you did!.... thanks a lot;... coz tomorrow is my 12th grade final exam.
Whoa, has nobody noticed that what he's showing doesn't even work? Using his example array, try searching for 55, or 98; it can't find it. The check for (low >= high) needs to be just after you check (value == arr[mid])
I really love your way of explaning. I should tell you I am not a native English Speake however, I've been able to understand most. Congratulation !!!! pd: GREETINGS FORM HONDURAS!
Using a C++ array of STRUCTUREs, write a program that takes input of student information - for 10 students - like: 1) Student ID. 2) Student name. 3) Course marks (5 courses for each student). The program provides below functionality: 1) Show all records. 2) Search and display a student record on ID. 3) Modify the record of a particular student. 4) Show the passing percentage for each course. 5) Show the names of students who failed in a particular course. 6) Show the total marks, the percentage, and the overall letter grade for individual students. 7) Show the names and the letter grades of all students in each course. 9) Show the student names for each letter grade in each course [ A >= 90% - B >= 80% - C >= 70% - D >= 60% - F < 60% ]. It is required to write a modular program.
well done explained. Should the number sequence ? coz i try random number and false answer. what is your application ? i'm using borland 5.02 ,about your code 'using namespace std' ,borland say that 'namescpace name expected' i'm bit consfused, please answer :)
@ReelLearning you made it so simple and logical to understand.Thanks for the video it helped me a lot. :) By the way what is the program you're using to write the code and compile it?
Reverse that array by storing it in another array like this: Say your original array is:array1[size]; int array2[size],k=0; for(int i=size-1;i>=0;i--) { array2[k]=array1[i]; k++; } Apply the sort on array2. That' s what i do. Hope it helps! You can also manipulate the binary sort algorithm but this method seems simpler
this is year 2024 and this stuff is still relevant, man c++ IS evergreen
Very well explained. I thought binary search was something awful when I saw it on my last exam. Thank you very much!
Tarik Đulić yes
Thank God you have an American accent
Xdd haha
👍
it's interesting that it's always the indians making these types of tutorials.
Stfu
@@4XD45 ikr?
I've my Computer Science boards practical exam on 1st Feb. U helped me a lot.... Thanks man
I love you man
Even my doctor couldn't make it this simple
Thanks so much - I have listened to your videos on arrays and passing arrays to functions - now I finally think I get the concepts - the explanations were clear and systematic - keep posting more videos - kudos sir for sharing your knowledge in a way that communicates to the student.
Thank you so much i've tried to understand this algorithm for 2 days even though this isnt that hard
with C++, there is no need for binary search. Just store data into set STL data structure and use its set::find() member function. But thanks for explaining binary search algo.
watch 4 videos looking for a simple detail concerning the algorithm. You had it.
Great video been looking for something like this all day lol
Thank You so much Derek, I wouldn't be able to answer this question in exam ,if I had not found your channel!
Sir can you explain why there is high = size-1 because I am little bit confuse. What is the use of high = size-1?
10:01
Here, size stands for the number of elements in the array ; So according to that , your high index value would be 1 less than the number of elements.
Why you update low and high to mid+1 or mid-1; and not just update low or high to mid; see for 55 would much faster
Thank you for this video, it's so helpful!!
Great video! Amazing! Thank you for uploading sir!
Sir which one do you think is the best compiler ( user friendly and easy to understand)?
code blocks is fantastic
what software do you use to run cpp file?
code-blocks
Thanks a bunch, got really stuck on this, your video helped a lot!
Thank you so much this is unbelievable helpful
This was great and simply explained, than you :)
You are awesome. Honestly!!
Thanxz very Good Instructions Given ..... Thank you Very Much.....
Thanks so much for this!!
now my eyes are widely open
what happened to you why did you disappear we missed you
Thank you very much sir.
Can anybody explain me, why "return -1"?
+Hilaritas if the element is not found
10:32, what if an overflow happens?
Low + (high - low) / 2
Thank you for posting :D
great work ,
It's low
Good tutorial.
Thank you Brother
thanks
Thank you!!
Amazing!!
Belissimo!
nice ...video
tku
haaaa gud stuff
WOW. Thank you! Programmers tend to be really snobby when it comes to helping. WE NEED MORE PROGRAMMERS LIKE YOU!
I have seen the Linear search algorithm you completely figured out for me. Your teaching way is a piece of cake.
Watching from Ethiopia. Thanks a bunch.
So basically, we can't do binary search if the array isn't sorted from low to high?
Unlike linear search that can do even though if the array isn't sorted (random number)
I just can say, you are THE BEST.
Many thanks for your great contribution, May God bless you :)
Thank you so much! I have a comprehensive c++ final today (it will cover material from both this and the previous semesters). Cheers!
Well done sir! Very helpful.
When dealing with huge arrays you risk to overflow when calculating mid. A safer way is: mid = low + (high - low) / 2 .
what does overflowing mean?
your mid point calculation can cause overflow
Pls dont stop making this videos. They really help!
It was really cool ! But here is the question though : What if the list/array is unsorted ; I mean if there is a large search space , say 50000 elements ; would we be able to sort it manually ? - NO. So, why don't we have a function for sorting too?
Thinking practically , there are not gonna be arrays with just 8 or 10 or 50 elements, so i think we need it.
Comment down your thoughts on this. :)
there are functions for sorting collections called sorting algorithms. there are a lot of good videos on youtube about them
admiration come it self if you competent like you .thanks
These are very helpful videos
Thank you for posting!
you are wonderful person and i really like your videos.
you are good at teaching...... i didn't find any video that made it as clear as you did!.... thanks a lot;... coz tomorrow is my 12th grade final exam.
great explanation
you're awesome!
I have a Two-Dimensional Arrays. Do you have a video showing how to use linear and binary search on a Two-Dimensional Arrays?
Whoa, has nobody noticed that what he's showing doesn't even work? Using his example array, try searching for 55, or 98; it can't find it. The check for (low >= high) needs to be just after you check (value == arr[mid])
how about this way no function than main is used .
int n, i, arr[50], search, first, last, middle;
coutn;
cout
I really love your way of explaning. I should tell you I am not a native English Speake however, I've been able to understand most. Congratulation !!!! pd: GREETINGS FORM HONDURAS!
Using a C++ array of STRUCTUREs, write a program that takes input of student information - for 10 students - like:
1) Student ID.
2) Student name.
3) Course marks (5 courses for each student).
The program provides below functionality:
1) Show all records.
2) Search and display a student record on ID.
3) Modify the record of a particular student.
4) Show the passing percentage for each course.
5) Show the names of students who failed in a particular course.
6) Show the total marks, the percentage, and the overall letter grade for individual students.
7) Show the names and the letter grades of all students in each course.
9) Show the student names for each letter grade in each course [ A >= 90% - B >= 80% - C >= 70% - D >= 60% - F < 60% ].
It is required to write a modular program.
well done explained. Should the number sequence ? coz i try random number and false answer.
what is your application ? i'm using borland 5.02 ,about your code 'using namespace std' ,borland say that 'namescpace name expected'
i'm bit consfused, please answer :)
Amazing video, helped a lot for a project.
your project was based upon binary search only🤣🤣
excellent!!
Oops, I think that was just a typo on my part and it still doesn't work, right?
What about last element
dude you are amazing!
Good explanation
How could I store all the words in my project? if I will go for a dcitonary?
Thanks
@ReelLearning you made it so simple and logical to understand.Thanks for the video it helped me a lot. :) By the way what is the program you're using to write the code and compile it?
does not teach
You explained this very well. Thank you
Great work, this really helped me out thank you! Instant like!
This is so helpful! Thanks!
Thank you for sharing good quality teaching. :-)
Regards!
Jarek Jaworski
Very helpful
What's up Derek from speech class
i tried, 55 is at index 4 and 98 is at index 7...
Awesome video. Clear and to the point.
thanks u save my life :')
My question is, would binary search still works if there's double or more of the specific data you're looking for?
If so, how/what's the algorithm?
for example if you are looking for 2 numbers you can give search value as input 2 times and run code 2 times ..
excellent and simplified presentation. thanx
Thank you very much, it helped me with homework)
my great video lecture ever...
Thank you so much brother.
yo dis my go to video for binary search
Wonderful, perfect explanation.
very well explained~!!!
Sir, that's nice video but it not working for descending array values. Any solution for that?
Reverse that array by storing it in another array like this:
Say your original array is:array1[size];
int array2[size],k=0;
for(int i=size-1;i>=0;i--)
{
array2[k]=array1[i];
k++;
}
Apply the sort on array2. That' s what i do. Hope it helps! You can also manipulate the binary sort algorithm but this method seems simpler
very nice presentation. Thankyou
Dont't work !!!!!!!!!!!!!!!!!!
Thanks very much for so simplified and excellent lecture!
what the result of log2(64000) represents ? i mean the 15.966. thanks a lot !
It takes 16 loops to search a number within an array of 64000 numbers.
Thank you for great lesson!
Thanks a lot man.
Great work man.
that was amazing
you are amazing :)
Great video