Oh My Algorithm
AlgorithmsExam study
KO
←
Trees

Algorithms · Trees

Choose one to explore step by step

Traversing and maintaining hierarchical data

Tree Traversal

O(n)

Compare systematic orders for visiting every tree node.

AVL Tree

O(log n)

An AVL tree keeps each node subtree heights within one of each other.

Segment Tree

Query/Update O(log n)

Store aggregate results for array ranges in a tree.

Trie

O(m) (string length)

A trie stores strings along shared prefix paths.

Learning topics

O-M-A/© 2026 OH MY ALGORITHM
AboutPrivacyTerms