DP World interview question

Leet code easy and medium problems