1. A method comprising: receiving a plurality of keys of a first data type having N elements of a second data type; creating a trie and adding a root node, wherein nodes added to the trie are initialized to a value of zero; defining a traverse procedure to process an input key at an input node of the trie, wherein the traverse procedure increments a value of one or more nodes, traversed according to the input key, until reaching a leaf node comprising at least one of a bottom node at a maximum depth corresponding to N and a halt node with a value not exceeding a predetermined threshold value, and wherein a new child node is added to the trie only when the value of a particular node is incremented beyond the predetermined threshold value; and executing the traverse procedure to process each of the plurality of keys at the root node of the trie; wherein the method is performed by one or more computing devices.