Linear Search Vs Binary Search
▻https://hackernoon.com/linear-search-vs-binary-search-ce7c56f8feb1?source=rss----3a8144eabfe3--
All programmers are familiar with Linear search and Binary Search. Generally we use use them to search any element and its location. Today’s discussion is about the comparison of these two searching algorithm.1. Sequential:Linear search follows sequence and Binary search doesn’t follow. Linear search starts searching from the starting to ending point. Binary searching starts from middle point.2. Sorted:For binary search we need sorted elements . Linear search does not need sorted elements .It searches all the element in all position till it gets the desired elements.3. Comparison:The number of comparison in Binary Search is less than Linear Search as Binary Search starts from the middle for that the total comparison becomes half of Linear Search.3. Comparison:The number of comparison in (...)
#linear-search #algorithms #binary-search #comaprision #linear-vs-binary