Google interview question

3 let code medium to hard-level questions