Sapphire Software interview question

They provided two leetcode easy problems to solve.