Skip to content

jamylak/binarysearch01

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Binary Search Visualizer

This visualisation uses AI Generated code, finetuned for the best visualisation, not code quality

binarysearch01.mov

Interactive Raylib visualizer for binary search, focusing on the shrinking search window, midpoint decisions, and why the invariant survives each discard step.

What This Visualisation Shows

  • How low, mid, and high define the active search window
  • Why each comparison lets half of the remaining candidates disappear
  • How the invariant changes when the target is found versus excluded
  • A breakdown view that keeps the active range obvious at all times

Visual Map

flowchart LR
    A["Sorted Array"]
    B["Choose Midpoint"]
    C["Compare To Target"]
    D["Discard Left or Right Half"]
    E["Shrink Search Window"]
    F["Found or Exhausted"]

    A --> B
    B --> C
    C --> D
    D --> E
    E --> B
    C --> F
Loading

Controls

  • q: quit
  • The app exposes the remaining step and scene controls in the active UI

Run

make run

About

Binary Search Visualiser

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors