Byte (YC S20) Interview Question

Easy level coding problem solving question from leetcode. 2 questions were given.