Transform map to bin trie