Skip to content

Resource · Guide or article

Tree

Recursive definition of the tree data type (root, children, no duplicate references), plus an index of the repository's tree subtopics.

Reviewed

Open the original: Tree (opens the original site in a new tab)

Practice this topicOpens the practice interviewer with a question on Trees.

Add to a roadmap

Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.

Source content: English

Read this in other languages: 简体中文, Português In computer science, a tree is a widely used abstract data type (ADT) — or data structure implementing this ADT—that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node, represented as a set of linked nodes. A tree data structure can be defined recursively (locally) as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the "children"), with the constraints that no reference is duplicated, and none points to the root.

PrepKit overview

PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.

Suited to
The source does not state a level
Format
Reference

What it covers

  • Links to binary search tree, AVL, red-black, segment tree (with min, max and sum range queries) and Fenwick tree folders
  • Recursive definition with an annotated diagram of an unordered tree

How to use it

PrepKit study advice, not a claim made by the source.

Use this page as a menu: pick the binary search tree folder first, then write insert, search and in-order traversal and check that the traversal output is sorted.

Scope and limitations

No operations, traversals or complexity here. The substance sits in the linked subfolder pages, which are separate listings.

Access and format

Index README on GitHub, trekhleb/javascript-algorithms (MIT), with Chinese and Portuguese translations. English, free.

Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 85293e3e2b88

Evidence behind this overview
  • src/data-structures/tree/README.md

Related preparation

These are PrepKit study suggestions, not employer endorsements or predictions of interview questions.

Pages that include this

Get the PrepKit newsletter

Optional. You don't need it to use PrepKit.

How we handle your email