Eze Software interview question

Logic