Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 50s1 days 16 hours 1 minutes 50 seconds.
Price your future right. 60% off with code BLACKSCHOLES at USD checkout. Offer ends in 1d 16h 01m 50s1 days 16 hours 1 minutes 50 seconds.

Sign in to watch this lesson
Algorithms - Strings · 4:52
A trie stores a set of words as a tree of letters, so shared prefixes are kept once and "how many words start with p?" costs one step per letter of p, however many words there are. We build one from six words, add pass counters for prefix counts and deletion, lay it out as an array of child indices to see its O(m·k) memory, time it against scanning every symbol on a Mac, and finish with the binary trie that finds the maximum XOR pair.