DEV Community

Discussion on: Complete Introduction to the 30 Most Essential Data Structures & Algorithms

Collapse
 
goodevilgenius profile image
Dan Jones

I'm no expert on this, so I may be mistaken, but I believe there's a mistake in your Binary Search Tree diagram.

Binary Search Tree

Shouldn't the 20 be to the left of the 21, rather than the left of the 38?

Collapse
 
codinglanguages profile image
Your DevOps Guy

You are right. Everything to the right of 21 should be greater (or equal to, if the tree contains duplicates) than 21.

Good catch!

Collapse
 
iuliagroza profile image
Iulia Groza

Oh, I'm so sorry! It was a typo. It was 30 instead of 20 in my initial thread. Thank you for noticing! Fixed it! :)