Tools / Binary Search

Binary Search Tree

Step through the halving strategy from picoCTF's Binary Search challenge, adjust targets, and watch the range collapse in real time.

Binary Search Tree Explorer

Watch how the search space shrinks on every guess. Set a target value, step manually, or auto-play the logic used in the challenge.

Known low

1

Known high

1000

Current guess

500

Use service feedback to guide the next guess.

Client input

500

Service response

Click the button that matches the challenge's reply for the current guess.

Search history(0 / 10 guesses)

No guesses yet. Step through the algorithm to start capturing the decision trail.

Tree view (depth ≤ 9)

Nodes highlighted when the algorithm inspects their midpoint.

depth 0

500

11000

depth 1

250

1499

depth 1

750

5011000

depth 2

125

1249

depth 2

375

251499

depth 2

625

501749

depth 2

875

7511000

depth 3

62

1124

depth 3

187

126249

depth 3

312

251374

depth 3

437

376499

depth 3

562

501624

depth 3

687

626749

depth 3

812

751874

depth 3

938

8761000

depth 4

281

251311

depth 4

343

313374

depth 4

406

376436

depth 4

468

438499

depth 4

531

501561

depth 4

593

563624

depth 4

656

626686

depth 4

718

688749

depth 5

390

376405

depth 5

421

407436

depth 5

452

438467

depth 5

484

469499

depth 5

515

501530

depth 5

546

532561

depth 5

577

563592

depth 5

609

594624

depth 6

444

438451

depth 6

460

453467

depth 6

476

469483

depth 6

492

485499

depth 6

507

501514

depth 6

523

516530

depth 6

538

532545

depth 6

554

547561

depth 7

472

469475

depth 7

480

477483

depth 7

488

485491

depth 7

496

493499

depth 7

503

501506

depth 7

511

508514

depth 7

519

516522

depth 7

527

524530

depth 8

486

485487

depth 8

490

489491

depth 8

494

493495

depth 8

498

497499

depth 8

501

501502

depth 8

505

504506

depth 8

509

508510

depth 8

513

512514

depth 9

491

491491

depth 9

493

493493

depth 9

495

495495

depth 9

497

497497

depth 9

499

499499

depth 9

502

502502

depth 9

504

504504

depth 9

506

506506