Verily Interview Question

LC easy and LC hard