longest_prefix_matcher Algorithm to find the longest matching prefix for a binary string using a binary trie