← Tree Traversal

Micro-Drill #108 — TrieNode class

Tree Traversal Target: 10s

The trie node with children dict and end flag is the foundation for prefix-search data structures.

class TrieNode:
    def __init__(self):
        self.children = {}
        self.end = False

Type it from memory. Go.

Practice Problems

← Micro #107 Micro #109 →