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
Client input
500
Service response
Click the button that matches the challenge's reply for the current guess.
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
1 – 1000
depth 1
250
1 – 499
depth 1
750
501 – 1000
depth 2
125
1 – 249
depth 2
375
251 – 499
depth 2
625
501 – 749
depth 2
875
751 – 1000
depth 3
62
1 – 124
depth 3
187
126 – 249
depth 3
312
251 – 374
depth 3
437
376 – 499
depth 3
562
501 – 624
depth 3
687
626 – 749
depth 3
812
751 – 874
depth 3
938
876 – 1000
depth 4
281
251 – 311
depth 4
343
313 – 374
depth 4
406
376 – 436
depth 4
468
438 – 499
depth 4
531
501 – 561
depth 4
593
563 – 624
depth 4
656
626 – 686
depth 4
718
688 – 749
depth 5
390
376 – 405
depth 5
421
407 – 436
depth 5
452
438 – 467
depth 5
484
469 – 499
depth 5
515
501 – 530
depth 5
546
532 – 561
depth 5
577
563 – 592
depth 5
609
594 – 624
depth 6
444
438 – 451
depth 6
460
453 – 467
depth 6
476
469 – 483
depth 6
492
485 – 499
depth 6
507
501 – 514
depth 6
523
516 – 530
depth 6
538
532 – 545
depth 6
554
547 – 561
depth 7
472
469 – 475
depth 7
480
477 – 483
depth 7
488
485 – 491
depth 7
496
493 – 499
depth 7
503
501 – 506
depth 7
511
508 – 514
depth 7
519
516 – 522
depth 7
527
524 – 530
depth 8
486
485 – 487
depth 8
490
489 – 491
depth 8
494
493 – 495
depth 8
498
497 – 499
depth 8
501
501 – 502
depth 8
505
504 – 506
depth 8
509
508 – 510
depth 8
513
512 – 514
depth 9
491
491 – 491
depth 9
493
493 – 493
depth 9
495
495 – 495
depth 9
497
497 – 497
depth 9
499
499 – 499
depth 9
502
502 – 502
depth 9
504
504 – 504
depth 9
506
506 – 506