Cisco interview question

just some easy leetcode problems.