Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Depth-first Search in a Binary Search Tree: Pre-order

F9d1e7c494103e9ad73723d4496334f9?s=47 Matt
December 30, 2021

Depth-first Search in a Binary Search Tree: Pre-order

F9d1e7c494103e9ad73723d4496334f9?s=128

Matt

December 30, 2021
Tweet

Transcript

  1. 2 3 4 8 5 9 6

  2. 2 3 4 8 5 9 6

  3. 2 3 4 8 5 9 6

  4. 2 3 4 8 5 9 6

  5. 2 3 4 8 5 9 6 5

  6. 2 3 4 8 5 9 6 5

  7. 5 2 3 4 8 5 9 6 5

  8. 2 3 4 8 5 9 6 5 5 3

  9. 2 3 4 8 5 9 6 5 5 3

  10. 2 3 4 8 5 9 6 5, 3 5

    3
  11. 2 3 4 8 5 9 6 5, 3 5

    3 2
  12. 2 3 4 8 5 9 6 5, 3 5

    3 2
  13. 2 3 4 8 5 9 6 5, 3, 2

    5 3 2
  14. 2 3 4 8 5 9 6 5, 3, 2

    5 3 2
  15. 2 3 4 8 5 9 6 5, 3, 2

    5 3 2
  16. 2 3 4 8 5 9 6 5, 3, 2

    5 3
  17. 2 3 4 8 5 9 6 3 5, 3,

    2 5 3
  18. 2 3 4 8 5 9 6 5, 3, 2

    5 3 4
  19. 2 3 4 8 5 9 6 5, 3, 2

    5 3 4
  20. 2 3 4 8 5 9 6 5, 3, 2,

    4 5 3 4
  21. 2 3 4 8 5 9 6 5, 3, 2,

    4 5 3 4
  22. 2 3 4 8 5 9 6 5, 3, 2,

    4 5 3 4
  23. 2 3 4 8 5 9 6 5, 3, 2,

    4 5 3
  24. 2 3 4 8 5 9 6 3 5, 3,

    2, 4 5 3
  25. 2 3 4 8 5 9 6 5, 3, 2,

    4 5
  26. 2 3 4 8 5 9 6 5 5, 3,

    2, 4 5
  27. 2 3 4 8 5 9 6 5, 3, 2,

    4 5 8
  28. 2 3 4 8 5 9 6 5, 3, 2,

    4 5 8
  29. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8 5 8
  30. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8 5 8 6
  31. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8 5 8 6
  32. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6 5 8 6
  33. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6 5 8 6
  34. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6 5 8 6
  35. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6 5 8
  36. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6 8 5 8
  37. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6 5 8 9
  38. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6 5 8 9
  39. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9 5 8 9
  40. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9 5 8 9
  41. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9 5 8 9
  42. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9 5 8
  43. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9 8 5 8
  44. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9 5
  45. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9 5 5
  46. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9
  47. 2 3 4 8 5 9 6 5, 3, 2,

    4, 8, 6, 9
  48. 2 3 4 8 5 9 6