Google interview question

2 leetcode like problems in 45 minutes