Skip to main content
mediumBlind 75

Design Add and Search Words Data Structure

Build a Trie data structure for storing and searching words Trie: tree where each node represents a character Example: add_word("bad"), search("bad") -> True search("pad") -> False

A trie stores the words; the dot is what makes search interesting. On a wildcard I branch into every child at once.

StringTreesBFS / DFSDesign

Meet Coco

Coco is an AI study partner, not a person. She listens while you explain your code, asks what a line does and never hands you the fix. Typing with Coco is free when you sign in, up to a daily limit. Talking with her out loud comes with the $79 pack. Anyone can open the editor and run their code.

1Word Dictionary - Basic Triemedium
2Part 2

Each locked part opens in the editor once the part before it passes.

Based onLeetCode