Zomato interview questions

129 questions from 22 interviews · updated from reports 2016-2025

Practise Zomato-style

About

Zomato is an Indian food delivery and restaurant discovery company that connects users with restaurants for ordering, dining information, and related services. In India, it hires technical talent for roles such as Software Engineer, SDE, and SDE Intern.

The roles that come up most are Software Engineer, SDE and SDE Intern. This covers 22 candidate interviews reported from 2016 to 2025. The largest group sat it at entry level (11 of 22 that recorded a level), with 5 internship interviews alongside. Among the 15 that recorded either route, arrivals split between campus drives (9, 60%) and off-campus applications (6, 40%). Most questions fall under DSA and CS fundamentals.

Category
Difficulty
Round

Interview questions

Q. Reverse a linked list in groups of size K.

asked 2xmediumLinked listsTechnical2023-2024

Ans. Reverse each block of k nodes by rewiring next pointers, then connect the previous block’s tail to the new head of the reversed block. Use three pointers to reverse a block in place, and first check that k nodes remain if partial groups should stay unchanged. Time complexity is O(n), space complexity is O(1).

Q. Explain the four pillars of Object-Oriented Programming with real-life examples.

asked 2xeasyOOPTechnical2023-2024

Ans. The four pillars are encapsulation, abstraction, inheritance and polymorphism. Encapsulation hides data, like a bank account exposing deposit and withdraw methods. Abstraction shows only essentials, like driving a car without knowing the engine. Inheritance lets a car and bike share vehicle traits. Polymorphism lets different vehicles implement start differently.

Q. Design a rate limiter

asked 1xmediumScalabilitySystem design2024

Ans. Use a token bucket per client key, stored in a fast shared store such as Redis. Each request refills tokens based on elapsed time, then consumes one token if available, otherwise rejects with 429. The key detail is making refill and consume atomic, usually with a Redis Lua script, to avoid race conditions across servers.

Q. Design and implement an LRU Cache

asked 1xmediumDesignTechnical2017

Ans. Implement an LRU cache with a hash map from key to list node and a doubly linked list ordered by recent use. On get, return the value and move the node to the front. On put, update or insert at the front. If capacity is exceeded, remove the tail. Both operations are O(1).

Q. Explain CPU scheduling algorithms.

asked 1xmediumOperating systemsTechnical2022

Ans. CPU scheduling algorithms decide which ready process gets the CPU next. Common algorithms include First Come First Served, Shortest Job First, Round Robin, Priority Scheduling and Multilevel Queue. The key trade-off is between throughput, response time, waiting time and fairness, with pre-emptive algorithms allowing the OS to interrupt a running process.

Q. Explain indexing and paging in DBMS.

asked 1xmediumDBMSTechnical2022

Ans. Indexing is a technique that creates a separate data structure, such as a B-tree or hash index, to find rows faster without scanning the whole table. Paging divides query results or stored data into fixed-size pages or chunks. The key trade-off is faster access and manageable reads, at the cost of extra storage and maintenance.

Q. Find the k nearest points to the origin

asked 1xmediumArraysTechnical2017

Ans. Use squared distance x² + y² to avoid square roots, then keep the k smallest distances. A common approach is a max heap of size k: push each point, and if the heap grows beyond k, remove the farthest. This takes O(n log k) time and O(k) space.

Q. Explain load balancing and consistent hashing

asked 1xmediumScalabilityTechnical2024

Ans. Load balancing spreads requests across servers to improve availability, latency, and throughput, while consistent hashing maps keys and servers onto a hash ring so each key is routed to a stable server. The key benefit is that when servers are added or removed, only a small fraction of keys move, especially with virtual nodes for fairness.

Q. Find the maximum product subarray in an array

asked 1xmediumArraysTechnical2021

Ans. Use a single pass dynamic approach, keeping the maximum and minimum product ending at each position. The key detail is that a negative number can turn the minimum product into the maximum, so update both values for every element. Track the best maximum seen overall. This runs in O(n) time and O(1) space.

Q. Why is Kubernetes needed and how does it work?

asked 1xmediumDevopsTechnical2024

Ans. Kubernetes is needed to run, scale and recover containerised applications reliably across many machines. It works by comparing the desired state you declare, such as deployments, replicas and services, with the actual cluster state. Its control plane schedules pods onto worker nodes, restarts failed containers, balances traffic and manages rollouts.

Q. Find the largest rectangular area in a histogram

asked 1xmediumStackOnline test2021

Ans. Use a monotonic increasing stack of bar indices to compute the maximum rectangle in one pass. When the current bar is lower than the stack top, pop bars and calculate area using the popped height and the width between the new stack top and current index. Add a sentinel zero bar. Time is O(n).

Q. Reverse a linked list in groups of a given size.

asked 1xmediumLinked listsTechnical2020

Ans. Reverse each group of k nodes by iterating through the list and reversing pointers within the current group, then connect the previous group’s tail to the new head. Use only node pointers, not an extra data structure. If fewer than k nodes remain, usually leave them unchanged. Time complexity is O(n), space is O(1).

Q. Implement backend request handling logic in Golang

asked 1xmediumBackendSystem design2024

Ans. Implement it as small net/http handlers that parse and validate input, call a service layer, then return JSON with the correct status code. Use context for cancellation, deadlines and request scoped values. Keep shared state behind interfaces or concurrency safe types. Routing is usually map or trie based, with near constant lookup.

Q. Modify a hash map implementation to be thread-safe.

asked 1xmediumOperating systemsTechnical2024

Ans. Add synchronisation around all operations that read or mutate the table, including insert, get, delete, and resize. The simplest approach is one mutex for the whole map, giving correct behaviour but limited concurrency. A better design uses striped locks per bucket group, while resize must take an exclusive global lock to prevent races.

Q. Validate an arithmetic expression without brackets.

asked 1xmediumStacksTechnical2022

Ans. Scan the expression left to right and check that tokens alternate correctly between operands and operators. Keep a flag for whether an operand is expected, accept numbers when it is true, accept operators only after an operand, and reject invalid characters. At the end, the expression is valid only if it ended with an operand. Time complexity is O(n).

Q. Design a URL shortening service like Bitly (TinyURL).

asked 1xmediumUrl shortenerTechnical2021

Ans. Build an API that creates short codes, stores code to long URL mappings, and redirects users by looking up the code. Use a load-balanced stateless service, a highly available key-value store, caching for hot links, and analytics asynchronously. The most important detail is generating unique, non-guessable short codes without central bottlenecks.

Q. What is indexing and how is it implemented internally?

asked 1xmediumDBMSSystem design2019

Ans. Indexing is a way to speed up data lookup by keeping a separate structure that maps search keys to the location of records. Internally, databases commonly implement indexes using B-trees or B+ trees, which keep keys sorted and point to disk pages or rows. This improves reads but adds storage and write overhead.

Q. Should kissing and obscene scenes be banned from films?

asked 1xmediumVerbalGroup discussion2020

Ans. A strong answer takes a balanced, values-led position rather than sounding censorious. Pick the common view that age ratings, context, and audience choice matter more than blanket bans. Emphasise artistic freedom, cultural sensitivity, child protection, and responsible certification. Interviewers listen for maturity, tolerance, and the ability to handle sensitive social issues calmly.

Q. Write an SQL query involving joins across three tables.

asked 1xmediumSQLTechnical2024

Ans. Join customers to orders on customer_id, then join orders to order_items on order_id, selecting the customer name, order date, product id, and quantity. Use inner joins if you only want matching rows in all three tables. The database uses indexed tables, and performance is roughly proportional to matched rows when join keys are indexed.

Q. How do you handle priorities while using multithreading?

asked 1xmediumOperating systemsTechnical2024

Ans. I handle priorities by scheduling work, not by relying only on thread priority. I use a priority queue feeding a fixed thread pool, where higher priority tasks are selected first. The key detail is preventing starvation, usually with ageing or quotas, while protecting the queue with proper synchronisation or concurrent data structures.

Q. How is data actually stored internally in Elasticsearch?

asked 1xmediumDBMSSystem design2019

Ans. Elasticsearch stores data in Apache Lucene indices, split into shards, where each shard is a Lucene index made of immutable segments. Documents are indexed mainly as inverted indexes for fast search, while fields used for sorting, aggregations and scripts are stored as columnar doc values. The original JSON is usually kept in _source.

Q. Explain how neural networks work and how they are trained

asked 1xmediumMachine learningTechnical2024

Ans. Neural networks learn a function by passing inputs through layers of weighted connections and nonlinear activation functions to produce an output. Training adjusts the weights to reduce a loss function, usually using backpropagation to compute gradients and an optimiser such as gradient descent to update weights over many labelled examples.

Q. Explain the Retrieval-Augmented Generation (RAG) pipeline

asked 1xmediumMachine learningTechnical2024

Ans. A RAG pipeline retrieves relevant external knowledge before generating an answer with a language model. Documents are ingested, split into chunks, embedded into vectors, and stored in a vector database. At query time, the query is embedded, similar chunks are retrieved, added to the prompt, and the model produces a grounded response.

Q. Given two line segments, determine whether they intersect.

asked 1xmediumGeometryTechnical2016

Ans. Use orientation tests on the four ordered triples formed by the segment endpoints. Two segments intersect if the orientations differ on both sides, or if any orientation is zero and the corresponding point lies on the other segment. The key detail is handling collinear overlap with bounding-box checks. This runs in constant time and uses no extra data structure.

Q. Explain the internal implementation details of map in C++ STL

asked 1xmediumOOPTechnical2021

Ans. std::map is usually implemented as a self-balancing binary search tree, most commonly a red-black tree. Each node stores a key-value pair plus links and colour metadata. Keys are kept ordered using the comparator, with unique keys only. Search, insert and erase take O(log n), and iteration gives sorted order.

Q. Explain what caching is and how caching works at a low level.

asked 1xmediumOperating systemsTechnical2024

Ans. Caching stores frequently used data in a faster place so future requests avoid slower work, such as disk, network, database, or main memory access. At a low level, data is looked up by key or address; a hit returns it immediately, while a miss fetches it from the source, stores it, and may evict older entries.

Q. Find the next smallest palindrome greater than a given number

asked 1xmediumStringsOnline test2021

Ans. Mirror the left half onto the right; if the result is greater than the input, it is the answer. Otherwise, increment the middle digit or digits, propagate any carry leftwards, then mirror again. The all 9s case becomes 100...001. Use a digit string or array, with O(n) time and O(n) space.

Q. Implement a hash map from scratch with integer keys and values.

asked 1xmediumHashingTechnical2024

Ans. Use an array of buckets, where each bucket stores key value pairs, commonly as a linked list or dynamic list for separate chaining. Hash the integer key to an index, search that bucket for updates or reads, and resize when the load factor grows. Average operations are O(1), worst case O(n).

Q. Given two numbers, determine whether they are coprime using GCD.

asked 1xmediumNumber theoryOnline test2023

Ans. Two numbers are coprime if their greatest common divisor is 1. Compute the GCD using the Euclidean algorithm: repeatedly replace the larger number with the remainder when divided by the smaller number until the remainder is 0. If the final GCD is 1, they are coprime. Time complexity is logarithmic.

Q. Delete a node from a Binary Search Tree using a recursive approach.

asked 1xmediumTreesTechnical2024

Ans. Recursively search for the key, then delete it by handling three cases: no child, one child, or two children. For two children, replace the node’s value with its inorder successor, the minimum in the right subtree, then recursively delete that successor. Time is O(h) and recursive stack space is O(h).

Q. Implement insertion and deletion operations in a Binary Search Tree.

asked 1xmediumTreesTechnical2023

Ans. Use a node-based Binary Search Tree where insertion follows left or right comparisons until a null child is found, then attaches the new node there. Deletion handles three cases: leaf, one child, or two children. For two children, replace with the inorder successor or predecessor, then delete that node. Average time is O(log n), worst case O(n).

Q. Convert a binary tree to a doubly linked list using inorder traversal

asked 1xmediumTreesTechnical2021

Ans. Use an inorder traversal and relink each visited node with the previously visited node. Keep two pointers, head for the first node and prev for the last processed node. Traverse left, connect prev.right to current and current.left to prev, update prev, then traverse right. This is in-place, O(n) time and O(h) recursion space.

Q. Find the number of islands in a 2D grid using DFS or other approaches.

asked 1xmediumGraphsTechnical2020

Ans. Scan the grid, and each time you find unvisited land, count one island and run DFS to mark all connected land. Use a visited matrix or mutate the grid, and explore four neighbours: up, down, left, right. The time complexity is O(rows times columns), with O(rows times columns) worst case space.

Q. Explain embedding models like Word2Vec and how they use neural networks

asked 1xmediumMachine learningTechnical2024

Ans. Embedding models like Word2Vec turn words into dense numeric vectors where similar words have similar positions. Word2Vec uses a shallow neural network trained on text, either predicting a word from its context or predicting nearby words from a word. The learned hidden-layer weights become the word embeddings.

Q. Delete a node from a Binary Search Tree (BST) using a recursive approach.

asked 1xmediumTreesTechnical2023

Ans. Recursively delete by searching for the key, then reconnecting the subtree returned by each call. If the node is a leaf, return null. If it has one child, return that child. If it has two children, replace its value with the inorder successor, then delete that successor. Time is O(h), where h is tree height.

Q. Minimum operations required to make all rows and columns of a matrix equal

asked 1xmediumMatrixOnline test2021

Ans. The minimum operations are n times the maximum of the largest row sum and largest column sum, minus the total matrix sum. In one operation, increment any cell by 1. The final common row and column sum must be at least both maxima, and choosing that value is always achievable. Time complexity is O(n²).

Q. Optimize backend logic using Golang concurrency with goroutines and channels

asked 1xmediumConcurrencySystem design2024

Ans. Use goroutines to run independent backend work in parallel and channels to collect results, errors, or cancellation signals safely. The key detail is bounding concurrency with a worker pool or semaphore, so load does not overwhelm CPU, database, or downstream services. This usually improves latency while keeping shared state minimal and controlled.

Q. Explain how multithreading works and how threads are different from processes.

asked 1xmediumOperating systemsTechnical2024

Ans. Multithreading lets a process run multiple threads of execution concurrently, sharing the same address space and resources. Each thread has its own stack, registers and program counter, but shares heap and files with other threads. Processes are isolated OS instances with separate memory, so communication is costlier but faults are better contained.

Q. Given three database tables, write an SQL query to retrieve the required data.

asked 1xmediumSQLTechnical2024

Ans. Join the three tables using their primary key and foreign key relationships, select only the required columns, and apply any filtering, grouping, or ordering conditions specified. The key detail is choosing the correct join type, usually inner join for matching records only, or left join when records from the main table must be preserved.

Q. What are the different task scheduling algorithms and when should each be used?

asked 1xmediumOperating systemsTechnical2024

Ans. Common scheduling algorithms are FCFS for simple batch work, shortest job first or shortest remaining time for minimising average wait, priority scheduling for importance-based work, round robin for interactive time-sharing, multilevel feedback queues for mixed workloads, and earliest deadline first for real-time systems. The key trade-off is fairness versus throughput, latency and predictability.

Q. Implement merge sort to sort an array, and explain the logic and time complexity.

asked 1xmediumSortingTechnical2023

Ans. Use merge sort by recursively splitting the array into two halves, sorting each half, then merging the two sorted halves into one sorted array. The key step is merging with two pointers while copying the smaller current element first. Its time complexity is O(n log n) and extra space is O(n).

Q. Implement a function to play the previously played song while shuffling a playlist.

asked 1xmediumArraysTechnical2020

Ans. Maintain a history stack of songs actually played, independent of the shuffled order. When playing a new shuffled song, push the current song onto the stack, then choose the next song randomly from the remaining candidates. To play previous, pop from the stack and make it current. Previous is O(1); selecting next is O(1) if indexed properly.

Q. Write SQL queries involving joins between two tables with different join conditions.

asked 1xmediumSQLTechnical2024

Ans. Use an inner join when rows must match in both tables, a left join when all rows from the first table are required, and a non-equi join when the condition is a range or comparison. Join conditions normally use indexed key columns, such as customer id, to keep lookup cost low.

Q. Design and implement an LRU Cache with O(1) time complexity for get and put operations

asked 1xmediumDesignTechnical2021

Ans. Use a hash map plus a doubly linked list to implement the LRU cache in O(1). The map stores keys to list nodes, and the list stores usage order, with most recent at the front. On get, move the node to front. On put, update or insert, and evict the tail if capacity is exceeded.

Q. Find the number of unique paths in a grid with obstacles from top-left to bottom-right

asked 1xmediumDynamic programmingOnline test2021

Ans. Use dynamic programming where each cell stores the number of ways to reach it, treating obstacle cells as zero paths. Start with 1 at the top-left if it is not blocked, then fill each cell from top to bottom and left to right using paths from above plus left. Time is O(mn), space can be O(n).

Q. Explain polymorphism, its types, method overloading vs overriding, and dynamic binding.

asked 1xmediumOOPTechnical2024

Ans. Polymorphism means the same interface or method call can have different behaviour depending on the object or parameters. Its main types are compile-time polymorphism, such as method overloading, and runtime polymorphism, such as method overriding. Overloading uses same method name with different parameters. Overriding replaces a parent method in a subclass. Dynamic binding chooses overridden method at runtime.

Q. Find all occurrences of anagram substrings (permutations of a pattern) in a given string

asked 1xmediumStringsTechnical2021

Ans. Use a sliding window of length equal to the pattern and compare character frequencies. Build a frequency map or array for the pattern, then move through the string updating the window counts by removing the left character and adding the right. Whenever counts match, record the start index. This runs in O(n) time.

Q. What are the benefits of storing data in Elasticsearch compared to traditional databases?

asked 1xmediumDBMSSystem design2019

Ans. Elasticsearch is better for fast full text search, filtering and aggregations over large volumes of semi-structured data. Its inverted indexes, distributed shards and near real time indexing make search and analytics much quicker and easier to scale than typical relational databases, though it is not ideal for strict transactional consistency.

Q. Given x values sorted by x, where y = 3x^2 + 3x - 36, output the (x, y) pairs sorted by y.

asked 1xmediumTwo pointersSystem design2020

Ans. Find the split around the vertex x = -0.5, then merge outwards by y. Values to the left, read backwards, have increasing y; values to the right, read forwards, also have increasing y. Use two pointers to output the smaller y each time. Time is O(n), extra space is O(1) besides output.

Q. Explain image compression techniques and how color reduction is performed in digital images.

asked 1xmediumComputer graphicsTechnical2016

Ans. Image compression reduces file size by removing redundancy, either losslessly or lossily. Lossless methods include run-length, Huffman, LZW and PNG-style prediction, while lossy methods such as JPEG use transforms, quantisation and entropy coding. Colour reduction maps many colours to a smaller palette, often using quantisation, clustering, or dithering to preserve appearance.

Q. Implement a JavaScript prototype method to check if two arrays are equal (arr.isEqual(arr2))

asked 1xmediumArraysSystem design2017

Ans. Add a method to Array.prototype that first checks the argument is an array and lengths match, then loops through both arrays and compares each element with strict equality. Use no extra data structure beyond the loop variables. This checks ordered, shallow equality only. Time complexity is O(n), space complexity is O(1).

Q. Given the same log file, how would you calculate the maximum number of active concurrent users?

asked 1xmediumArraysSystem design2019

Ans. Calculate it with a sweep line over session start and end events. Create +1 events for logins and -1 events for logouts, sort by timestamp, then scan while tracking the running active count and its maximum. If times are equal, process logouts before logins to avoid counting a user after their session ended.

Q. Allocate minimum number of pages among students such that the maximum pages assigned is minimized

asked 1xmediumBinary searchOnline test2021

Ans. Use binary search on the answer, where the answer is the maximum pages any student gets. The lower bound is the largest single book and the upper bound is the total pages. For each mid value, greedily assign contiguous books until the limit is exceeded. If students needed is valid, reduce high. Time complexity is O(n log sum).

Q. Painter's Partition Problem: Given boards and painters, find the minimum time to paint all boards.

asked 1xmediumBinary searchTechnical2024

Ans. Use binary search on the answer, where the time lies between the longest board and the sum of all boards. For each guessed time, greedily assign contiguous boards to the current painter until the limit is exceeded, then use another painter. If painters needed is within k, try smaller. Time complexity is O(n log total length).

Q. Design a shuffle function for a playlist such that each song is played exactly once in random order.

asked 1xmediumArraysTechnical2020

Ans. Use Fisher-Yates shuffle on the playlist array, then play the array from start to end. For each index i, choose a uniform random index j from i to n minus 1 and swap the songs. This gives each song exactly once and each order equal probability, in O(n) time and O(1) extra space.

Q. Maximal Square: Given a binary matrix, find the largest square containing only 1s and return its area

asked 1xmediumDynamic programmingTechnical2024

Ans. Use dynamic programming where each cell stores the side length of the largest all-1 square ending at that cell. If matrix[i][j] is 1, its value is 1 plus the minimum of top, left, and top-left neighbours; otherwise 0. Track the maximum side length and return its square. Time is O(mn), space can be O(n).

Q. You are a sales executive and I am a restaurant owner. How would you convince me to buy your service?

asked 1xmediumSalesManagerial2020

Ans. Choose a real example where you sold to a small business or solved a customer problem. Emphasise discovery before pitching: ask about empty tables, delivery costs, reviews, staffing or repeat bookings. Then link specific benefits to those needs, handle objections with evidence, and close clearly. Interviewers listen for curiosity, commercial sense and confidence.

Q. A cylinder is rolled out into a sheet. Given two points on the surface, find the shortest distance between them.

asked 1xmediumGeometryTechnical2016

Ans. Unroll the cylinder into a rectangle. Mark one point, then mark repeated copies of the other point on adjacent rectangles, shifted by one circumference each time. The shortest surface path is the minimum straight-line distance from the first point to any copy of the second, using Pythagoras.

Q. What would you do if Zomato does not work out for you? What are your backup plans?

asked 1xeasyCareer planningManagerial2020

Ans. A strong answer should show commitment to Zomato while sounding practical, not desperate. Pick a backup linked to the same career direction, such as similar roles in product, operations, sales, analytics, or customer experience. Emphasise learning from the process, improving gaps, and continuing towards the same long-term goal. Interviewers listen for resilience and clarity.

Q. Solve the puzzle of mislabeled jars to determine the correct labels using minimum checks.

asked 1xeasyLogical reasoningTechnical2023

Ans. Take one item from the jar labelled “mixed”. Since every label is wrong, that jar cannot be mixed, so the item tells you its true single type. If it is an apple, label it apples. The jar labelled oranges cannot be oranges, so it must be mixed. The remaining jar is oranges. Minimum checks: one.

Showing 60 of 129 questions. Ranked by how often the same question came back across interviews.

Practise a Zomato-style interview

A spoken interview built from these questions, scored when you finish; the feedback is yours.

Start practising

When you are ready, record The One: a single interview hiring teams watch, so you stop repeating first rounds.

Common questions

What questions does Zomato ask?

Candidate interviews most often cover DSA (45%) and CS fundamentals (41%).

How many rounds does Zomato interview have?

Candidate interviews show an average of 2.3 rounds per experience, with a typical sequence of Technical. Individual interview paths can vary.

Is the Zomato interview hard?

Among questions with a recorded difficulty, the mix is easy 28%, medium 64%, hard 8%.