Bloomberg interview question

A problem with longest prefix match algorithm.