Anjali interview question

They asked about and Check the logical thinking