Skip to content

Latest commit

 

History

History
46 lines (32 loc) · 1.06 KB

File metadata and controls

46 lines (32 loc) · 1.06 KB

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