Cisco Interview Question

1 very easy string manipulation + 2 medium questions from leetcode