Skip to content

Expand searching category from 1 to 18 algorithms across 5 techniques - #27

Merged
reshinto merged 2 commits into
mainfrom
claude/expand-searching-algorithms-MYzaa
Apr 1, 2026
Merged

reshinto merged 2 commits into
mainfrom
claude/expand-searching-algorithms-MYzaa

Conversation

@reshinto

@reshinto reshinto commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added 17 new searching algorithms organized across 5 technique subcategories, expanding the searching category from 1 to 18 total algorithms
  • Updated infrastructure: SearchingTracker now supports configurable algorithm labels; InputEditor handles diverse input shapes (sorted/unsorted arrays, array-only, number-only)
  • 159 files changed — 153 new files + 6 modified files, totaling 9,038 lines of new code

New Algorithms by Technique

Technique Algorithms
linear Linear Search, Sentinel Linear Search
binary Recursive Binary Search, Exponential Search, Interpolation Search, Lower Bound, Upper Bound, Search Rotated Array, Find Peak Element, Sqrt via Binary Search, Min Rotated Array, Meta Binary Search, Uniform Binary Search
jump Jump Search, Fibonacci Search
hashing Hash-Based Search
ternary Ternary Search

Per-Algorithm Deliverables (each algorithm includes)

  • 3-language source files (TypeScript, Python, Java) with @step: markers
  • Step generator using SearchingTracker
  • Educational content (all 7 sections)
  • Correctness tests + step-generation tests
  • Storybook pipeline story (3 states)
  • fn-import.d.ts entry + e2e input test entry

Test plan

  • Run npm run lint and verify no lint errors
  • Run npm run format and verify formatting
  • Run npm run typecheck and verify no type errors
  • Run npm test and verify all unit tests pass
  • Run npm run e2e and verify all 18 searching algorithms pass e2e checks
  • Verify each algorithm renders correctly in the UI with step-through playback
  • Verify InputEditor works for all input shapes (sorted+target, unsorted+target, array-only, number-only)

https://claude.ai/code/session_017mbTG4ZVzLdVhZwU8DhXDM

claude added 2 commits April 1, 2026 03:52
Add 17 new searching algorithms organized by technique:
- linear: Linear Search, Sentinel Linear Search
- binary: Recursive Binary Search, Exponential Search, Interpolation Search,
  Lower Bound, Upper Bound, Search Rotated Array, Find Peak Element,
  Sqrt via Binary Search, Min Rotated Array, Meta Binary Search,
  Uniform Binary Search
- jump: Jump Search, Fibonacci Search
- hashing: Hash-Based Search
- ternary: Ternary Search

Infrastructure changes:
- SearchingTracker: add configurable algorithmLabel parameter
- InputEditor: handle diverse searching input shapes (sorted/unsorted/array-only/number-only)

Each algorithm includes: 3-language sources with @step markers, step generator,
educational content, correctness tests, step-generation tests, and pipeline story.

https://claude.ai/code/session_017mbTG4ZVzLdVhZwU8DhXDM
- Change exponential-search step-generator test target from 72 to 23 so the
  binary search phase actually produces eliminate steps (72 was found at the
  boundary without narrowing)
- Fix uniform-binary-search delta table construction to ensure enough steps
  for small arrays (pad with extra delta=1 when log2-based minimum not met)
- Replace out-of-bounds break with index clamping + convergence check to
  prevent early termination when target is near array edges

https://claude.ai/code/session_017mbTG4ZVzLdVhZwU8DhXDM
@reshinto
reshinto merged commit b1e44f5 into main Apr 1, 2026
8 checks passed
@reshinto
reshinto deleted the claude/expand-searching-algorithms-MYzaa branch April 2, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants