Cisco interview question

Asked some puzzles and algorithms.