Problem 677 · Medium

Map Sum Pairs

Store key-value pairs and answer the total of all values whose keys start with a prefix. The visual walks a prefix trie and highlights the nodes that contribute to each sum.

Open the interactive visualisation