The Wikipedia article of the day for October 29, 2018 is Binary search algorithm.
A binary search algorithm is a method to determine the position of a target value within a sorted array (an ordered list). Binary search compares the target value to the middle element of the array. If they are not equal, the half in which the target cannot lie is eliminated and the search continues on the remaining half, again taking the middle element to compare to the target value, and so on. If the remaining half at any stage is found to be empty, then the target is not in the array. Even though the idea is simple, implementing binary search correctly requires attention to some subtleties about its exit conditions and midpoint calculation. Binary search runs in logarithmic time in the worst case. It is faster than linear search except for small arrays, but the array must be sorted first. Although specialized data structures designed for fast searching, such as hash tables, can be searched more efficiently, binary search applies to a wider range of problems.
Post Top Ad
Responsive Ads Here
Monday, October 29, 2018
Home
article of the day
Binary search algorithm
wikipedia
Wikipedia article of the day for October 29, 2018
Wikipedia article of the day for October 29, 2018
Subscribe to:
Post Comments (Atom)
Our Favorite Food Stories of 2024
By Unknown Author from NYT T Magazine https://ift.tt/hfq9MgE
Post Bottom Ad
Responsive Ads Here
Author Details
Templatesyard is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of templatesyard is to provide the best quality blogger templates which are professionally designed and perfectlly seo optimized to deliver best result for your blog.
No comments:
Post a Comment