Cisco Interview Question

new algorithmic question