Definition
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.
Related concepts
.NET FrameworkALGOL 60Addison-WesleyAegean IslandsAlbert R. MeyerAlgorithmAlgorithmic paradigmAlgorithmicaAmortized analysisAnna KarlinAnnual IEEE Symposium on Foundations of Computer ScienceApple Inc.Array (data structure)Array data structureAssociative arrayAssociative arraysB-treeBacktrackingBernard ChazelleBest, worst and average caseBig O notationBinary entropy functionBinary logarithmBinary search treeBinary treeBisection methodBitBit arrayBjarne StroustrupBloom filterBranch mispredictionBreadth-first searchBrute-force searchC++C++20C++ Standard LibraryCOBOLCRC PressC (programming language)C standard libraryCache (computing)Catholicon (1286)Central processing unitCharles E. LeisersonClifford SteinCocoa (API)Communications of the ACMComputational geometryComputer scienceConditional moveContent-addressable memoryCore FoundationCuckoo hashingD (programming language)Daniel KleitmanData miningData structureData structuresDatabaseDecimal computerDepth-first searchDerrick Henry LehmerDivide-and-conquer algorithmDonald KnuthDynamic programmingEdge caseEric W. WeissteinExponential searchFaith EllenFalse positives and false negativesFenwick treeFilesystemFloating-point arithmeticFloor and ceiling functionsFloor functionFold (higher-order function)Fractional cascadingFunction overloadingFusion treeGeneric programmingGo (programming language)Graph (abstract data type)Graph traversalGreedy algorithmGrover's algorithmHash functionHash tableHash tablesHeap (data structure)Hermann BottenbruchHewlett-PackardInformation Processing LettersInteger overflowInternet ProtocolInterpolation searchInterval (mathematics)Introduction to AlgorithmsJava (programming language)John MauchlyJon Bentley (computer scientist)Joshua BlochJournal of Computer and System SciencesJournal of the ACMJudy arrayKurt MehlhornLeonidas J. GuibasLexicographical orderLinear interpolationLinear probingLinear searchLinked listList of algorithmsList of data structuresLocality of referenceLogarithmLookup tableLov GroverMIX (abstract machine)MathWorldMemory addressMerge sortMicrosoftMinimaxModel of computationMoore School LecturesMultiplicative binary searchMultiplicative inverseNatural logarithmNearest neighbor searchO'Reilly MediaObjective-COn-Line Encyclopedia of Integer SequencesOnline algorithmOpen accessOracle CorporationOxford University PressPat MorinPaywallPseudocodePython (programming language)Quantum algorithmQuantum computingQueue (abstract data type)QuicksortRandom-access memoryRandomized algorithmRange (computer programming)Range query (data structures)Real numberRecord (computer science)Recursion (computer science)Richard E. PattisRobert Sedgewick (computer scientist)Robert TarjanRon RivestRonald RivestRoot-finding algorithmRuby (programming language)Rust (programming language)SIAM Journal on ComputingSally GoldmanScholarly peer reviewSearch algorithmSegment treeSelf-balancing binary search treeSet (abstract data type)Set (mathematics)SexagesimalSorted arraySorting algorithmSpace complexityStack (abstract data type)Standard libraryStanford UniversitySteel Bank Common LispStreaming algorithmString-searching algorithmString (computer science)SubroutineSweep line algorithmSymposium on Theory of ComputingThe Art of Computer ProgrammingThe Open GroupThe Rust FoundationThomas H. CormenThrashing (computer science)Time complexityTopological sortingTotal orderTranslation lookaside bufferTree (abstract data type)Tree (data structure)TrieTwenty QuestionsUlam's gameUniform binary searchUnisysVan Emde Boas treeW. Wesley PetersonWikiJournal of ScienceWord RAMWorld Scientific
16 concepts already in your glossary