Swiggy interview question

Machine coding round for search engine