Skip to Content
Grokking Algorithms, Second Edition
book

Grokking Algorithms, Second Edition

by Aditya Bhargava
March 2024
Beginner to intermediate
320 pages
7h 6m
English
Manning Publications
Content preview from Grokking Algorithms, Second Edition

8 Balanced trees

In this chapter

  • You learn about a new data structure called binary search trees (BSTs).
  • You learn about balanced trees and why they often perform better than arrays or linked lists.
  • You also learn about AVL trees, a type of balanced BST. In the worst-case scenario, binary trees can be slow. A balanced tree will help them perform effectively.

In the last chapter, you learned about the new data structure, trees. Now that you and trees are best friends, it’s time to see what they are used for. When arrays and linked lists fail to deliver the desired performance, a good next step is to try a tree. In this chapter, we’ll discuss the performance that trees can offer. We’ll then explore a special type of tree that can offer exceptional ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Grokking Algorithms

Grokking Algorithms

Aditya Bhargava
Algorithms: 24-part Lecture Series

Algorithms: 24-part Lecture Series

Robert Sedgewick, Kevin Wayne

Publisher Resources

ISBN: 9781633438538Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link