Talabat interview question

Easy Problem Solving question from leet code