In computer science, a trie, also called digital tree or prefix tree, is a kind of search tree—an ordered tree data structure used to store a dynamic set or associative array where the keys are usually strings.
Leetcode Data Structure Design Problem Set (1)
- 146.LRU Cache
- 284.Peeking Iterator
- 341.Flatten Nested List Iterator
- 295.Find Median from Data Stream
Leetcode Tree problem collection (3)
- 99.Recover Binary Search Tree
- 94.Binary Tree Inorder Traversal
- 116.Populating Next Right Pointers in Each Node
- 114.Flatten Binary Tree to Linked List
- 654.Maximum Binary Tree
- 106.Construct Binary Tree from Inorder and Postorder Traversal
Basically, there’re two ways to store data strctures: array and linked list.
All other data strctures, such as queue, stack, graph, hashmap, tree, heap, etc, all can be implemented by array and linked list.
Leetcode Tree problem collection (1)
- 104.Maximum Depth of Binary Tree
- 98.Validate Binary Search Tree
- 101.Symmetric Tree
- 102.Binary Tree Level Order Traversal
- 108.Convert Sorted Array to Binary Search Tree
Inorder (Left, Root, Right)
Preorder (Root, Left, Right)
Postorder (Left, Right, Root)