Key Concepts

Review core concepts you need to learn to master this subject

Wide and deep trees

There are two ways to describe the shape of a tree. Trees can be wide, meaning that each node has many children. And trees can be deep, meaning that there are many parent-child connections with few siblings per node. Trees can be both wide and deep at the same time.

Trees: Conceptual
Lesson 1 of 2
  1. 1
    Trees are an essential data structure for storing hierarchical data with a directed flow. Similar to linked lists and graphs, trees are composed of nodes which hold data. The diagram represents …
  2. 2
    Trees grow downwards in computer science, and a root node is at the very top. The root of this tree is /photos. /photos references to two other nodes: /safari and /wedding. /safari and /wedding …
  3. 3
    Trees come in various shapes and sizes depending on the dataset modeled. Some are wide, with parent nodes referencing many child nodes. Some are deep, with many parent-child relationships. Tre…
  4. 4
    Constraints are placed on the data or node arrangement of a tree to solve difficult problems like efficient search. A binary tree is a type of tree where each parent can have **no more than tw…
  5. 5
    Trees are useful for modeling data that has a hierarchical relationship which moves in the direction from parent to child. No child node will have more than one parent. To recap some terms: * ro…

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo