Zoho interview question

cubic puzzle