Bloomberg Interview Question

A problem with longest prefix match algorithm.