Arista Networks interview question

Design a trie based solution