This video could not play here.
It may be members-only, region-restricted, or unavailable in embedded players.
#28 Searching: Linear & Binary Search Explained With Example
Chapters
C Programming Tutorial #28 Searching, Unordered linear search, Ordered linear search, Binary search on an ordered array, Binary search illustration & code| Explained with Example. Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection. Binary search is a fast search algorithm with run-time complexity of Ο(log n). This search algorithm works on the principle of divide and conquer. For this algorithm to work properly, the data collection should be in the sorted form. Binary search looks for a particular item by comparing the middle most item of the collection. If a match occurs, then the index of item is returned. If the middle item is greater than the item, then the item is searched in the sub-array to the left of the middle item. Otherwise, the item is searched for in the sub-array to the right of the middle item. This process continues on the sub-array as well until the size of the subarray reduces to zero. C Programming Tutorial/ Lectures/ Course with Data Structures & Algorithms @ https://goo.gl/K6VbgL Machine Learning Complete Tutorial/Lectures/Course from IIT (nptel) for GATE @ https://goo.gl/AurRXm Discrete Mathematics for Computer Science for GATE @ https://goo.gl/YJnA4B (IIT Lectures for GATE) Best Programming Courses @ https://goo.gl/MVVDXR Operating Systems Lecture/Tutorials from IIT for GATE CSE @ https://goo.gl/GMr3if MATLAB Tutorials for GATE @ https://goo.gl/EiPgC