A trie (pronounced ’try’) is a tree-based data structure optimized for storing and retrieving strings. The name comes from ‘reTRIEval,’ though some pronounce it ’tree’ to emphasize its structure….
Read more →
In 1975, mathematician Jacob Goodman posed a deceptively simple problem: given a stack of pancakes of varying sizes, how do you sort them from smallest (top) to largest (bottom) using only a spatula…
Read more →
You have a matrix of integers. You need to answer thousands of queries asking for the sum of elements within arbitrary rectangles. Oh, and the matrix values change between queries.
Read more →