User Tools

Site Tools


binary_chop

Binary chop

Return to List of Algorithms, Algorithms

Also called: binary search, half-interval search, logarithmic search

Snippet from Wikipedia: Binary search algorithm

In computer science, binary search, also known as half-interval search, logarithmic search, or binary chop, is a search algorithm that finds the position of a target value within a sorted array. 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 repeating this until the target value is found. If the search ends with the remaining half being empty, the target is not in the array.

Binary search runs in logarithmic time in the worst case, making O ( log n ) {\displaystyle O(\log n)} comparisons, where n {\displaystyle n} is the number of elements in the array. Binary search is faster than linear search except for small arrays. However, the array must be sorted first to be able to apply binary search. There are specialized data structures designed for fast searching, such as hash tables, that can be searched more efficiently than binary search. However, binary search can be used to solve a wider range of problems, such as finding the next-smallest or next-largest element in the array relative to the target even if it is absent from the array.

There are numerous variations of binary search. In particular, fractional cascading speeds up binary searches for the same value in multiple arrays. Fractional cascading efficiently solves a number of search problems in computational geometry and in numerous other fields. Exponential search extends binary search to unbounded lists. The binary search tree and B-tree data structures are based on binary search.

Algorithms: Big O Notation, Iterative method Chase algorithm, Grokking Algorithms, Edsger Dijkstra, Donald Knuth: The Art of Computer Programming (TAOCP), Analysis of algorithms. Algorithms GitHub. (navbar_algorithms)

navbar_Algorithms

Algorithms: Algorithms Fundamentals, Algorithms Inventor: Algorithms Language Designer: ZZZ on DATE, YEAR; Algorithms DevOps - Algorithms SRE, Cloud Native Algorithms (Algorithms on Kubernetes - Algorithms on AWS - Algorithms on Azure - Algorithms on GCP), Algorithms Microservices, Algorithms Containerization (Algorithms Docker - Algorithms on Docker Hub), Serverless Algorithms, Algorithms Data Science - Algorithms DataOps - Algorithms and Databases (Algorithms ORM), Algorithms ML - Algorithms DL, Functional Algorithms (1. Algorithms Immutability, 2. Algorithms Purity - Algorithms No Side-Effects, 3. Algorithms First-Class Functions - Algorithms Higher-Order Functions, Algorithms Lambdas - Algorithms Anonymous Functions - Algorithms Closures, Algorithms Lazy Evaluation, 4. Algorithms Recursion), Reactive Algorithms), Algorithms Concurrency - Algorithms Parallel Programming - Async Algorithms, Algorithms Networking, Algorithms Security - Algorithms DevSecOps - Algorithms OAuth, Algorithms Memory Allocation (Algorithms Heap - Algorithms Stack - Algorithms Garbage Collection), Algorithms CI/CD - Algorithms Dependency Management - Algorithms DI - Algorithms IoC - Algorithms Build Pipeline, Algorithms Automation - Algorithms Scripting, Algorithms Package Managers, Algorithms Modules - Algorithms Packages, Algorithms Installation (Algorithms Windows - Chocolatey Algorithms, Algorithms macOS - Homebrew Algorithms, Algorithms on Linux), Algorithms Configuration, Algorithms Observability (Algorithms Monitoring, Algorithms Performance - Algorithms Logging), Algorithms Language Spec - Algorithms RFCs - Algorithms Roadmap, Algorithms Keywords, Algorithms Operators, Algorithms Functions, Algorithms Data Structures - Algorithms Algorithms, Algorithms Syntax, Algorithms OOP (1. Algorithms Encapsulation - 2. Algorithms Inheritance - 3. Algorithms Polymorphism - 4. Algorithms Abstraction), Algorithms Design Patterns - Algorithms Best Practices - Algorithms Style Guide - Clean Algorithms - Algorithms BDD, Algorithms Generics, Algorithms I/O, Algorithms Serialization - Algorithms Deserialization, Algorithms APIs, Algorithms REST - Algorithms JSON - Algorithms GraphQL, Algorithms gRPC, Algorithms Virtualization, Algorithms Development Tools: Algorithms SDK, Algorithms Compiler - Algorithms Transpiler, Algorithms Interpreter - Algorithms REPL, Algorithms IDEs (JetBrains Algorithms, Algorithms Visual Studio Code), Algorithms Linter, Algorithms Community - Algorithmsaceans - Algorithms User, Algorithms Standard Library - Algorithms Libraries - Algorithms Frameworks, Algorithms Testing - Algorithms TDD, Algorithms History, Algorithms Research, Algorithms Topics, Algorithms Uses - List of Algorithms Software - Written in Algorithms - Algorithms Popularity, Algorithms Bibliography - Algorithms Courses, Algorithms Glossary - Algorithms Official Glossary, Algorithms GitHub, Awesome Algorithms. (navbar_Algorithms)


© 1994 - 2024 Cloud Monk Losang Jinpa or Fair Use. Disclaimers

SYI LU SENG E MU CHYWE YE. NAN. WEI LA YE. WEI LA YE. SA WA HE.


binary_chop.txt · Last modified: 2024/04/28 03:44 (external edit)