Climb Some Trees

Knowledge of trees and tree traversal algorithms are required to understand the inner workings of databases, autocompletion, file directories, and much more. As usual, you'll get a strong overview of what you need to know before we jump into some problems.

Tree traversal algorithms are crucial for understanding how data is organized in many applications. They're used in file systems, compilers, XML parsers, databases and many other places. In this chapter we'll start by giving an overview of what trees are and why they're so useful, and get to know some more advanced patterns prior to jumping into problems!

Section Menu

How do I use this section?

1. LESSON

An Intro to Binary Trees and Binary Search Trees

Objective: In this lesson, we'll cover this concept, and focus on these outcomes: You'll learn what is a tree in general in the context of computer science. You'll learn what binary trees and binary search trees are. We'll show you how to use them in programming interview...

2. LESSON

BFS vs. DFS: Understanding Breadth First Search & Depth First Search

BFS vs. DFS Understanding Breadth First Search & Depth First Search Search During the days and weeks before a technical interview, we can apply the 80/20 rule for more efficient preparation. The 80/20 rule, otherwise known as Pareto's Law, stipulates that roughly 80% of your results will come from 20% of your efforts. Once you've gott...

3. LESSON

How Do We Get a Balanced Binary Tree?

The Marvel of Binary Trees: Understanding the Basics What is a Binary Tree? A Binary Tree is a specialized tree structure where each node has, at most, two child nodes. Interestingly, a binary tree can also be empty, meaning it has zero nodes. The Recursive Nature of Binary Trees One of the most intriguing aspects of binary tr...

4. LESSON

The Two Heaps Technique And Implementation

Objective: In this lesson, we'll cover this concept, and focus on these outcomes: You'll learn how to use the two heaps pattern when you need to find statistical values from a collection. We'll show you how to use this technique in programming interviews. You'll see how to ut...

5. LESSON

What Is A Segment Tree?

Welcome to the realm of Segment Trees! If you've meandered through the pathways of data structures, you've likely bumped into various trees. But today, we're introducing a special kind of tree that's less talked about yet incredibly powerful: the Segment Tree. What Exactly is a Segment Tree? Imagine you're building the next big thing sin...

6. LESSON

How Does the Minimax Algorithm Work?

Among the various components that are fundamental in Artificial Intelligence, algorithms are the most important ones. An algorithm basically is a sequence of unambiguous instructions that are used to solve a problem and conduct a sequence of specified actions. Artificial Intelligence is highly dependent on a couple of fundamental algorithms,...

7. LESSON

Huffman Coding Algorithm in Data Compression

The Huffman Coding Compression Algorithm Let's take a deep dive into the Huffman Coding Compression Algorithm and learn how to implement it step by step in various programming languages. Introduction...