Zomato Placement Papers 2024
Practice Zomato placement papers 2024 with coding questions, DSA problems, and complete solutions.
This comprehensive collection contains Zomato coding questions from previous year placement papers with detailed solutions. Practice these problems to master Zomato’s coding section covering DSA, system design, and behavioral questions.
| Parameter | Details |
|---|---|
| Total Problems | 2-3 DSA problems |
| Time Allocated | 90-120 minutes |
| Difficulty | Medium to Hard |
| Languages Allowed | Java, C++, Python, Go |
| Platform | HackerRank or Zomato’s internal tool |
| Additional | Debugging questions |
Given an array of integers, find the maximum sum subarray.
Example: Input: [-2, 1, -3, 4, -1, 2, 1, -5, 4], Output: 6 (subarray [4, -1, 2, 1])
Solution:
def max_subarray_sum(arr): max_sum = float('-inf') current_sum = 0 for num in arr: current_sum += num if current_sum > max_sum: max_sum = current_sum if current_sum < 0: current_sum = 0 return max_sumExplanation: Use Kadane’s algorithm - maintain current sum and reset to 0 if negative. Time: O(n), Space: O(1)
Answer: 6
Find shortest path between two nodes in a weighted graph using Dijkstra’s algorithm.
Example: Graph with nodes A, B, C, D and edges (A→B: 1), (A→C: 4), (B→C: 2), (C→D: 1), (B→D: 5). Shortest path from A to D: A→B→C→D (cost: 4)
Solution:
import heapq
def dijkstra(graph, src, dest): n = len(graph) dist = [float('inf')] * n dist[src] = 0 pq = [(0, src)]
while pq: d, u = heapq.heappop(pq) if u == dest: return d if d > dist[u]: continue for v, w in graph[u]: if dist[u] + w < dist[v]: dist[v] = dist[u] + w heapq.heappush(pq, (dist[v], v)) return dist[dest]Explanation: Use priority queue to always process node with minimum distance. Time: O((V+E)logV), Space: O(V)
Answer: 4
Given coins and amount, find minimum coins needed using dynamic programming.
Example: coins = [1, 2, 5], amount = 11. Output: 3 (5 + 5 + 1)
Solution:
def coinChange(coins, amount): dp = [amount + 1] * (amount + 1) dp[0] = 0 for i in range(1, amount + 1): for coin in coins: if coin <= i: dp[i] = min(dp[i], dp[i - coin] + 1) return -1 if dp[amount] > amount else dp[amount]Explanation: DP approach - for each amount, try all coins and take minimum. Time: O(amount × coins), Space: O(amount)
Answer: 3
Given a binary tree, return level order traversal.
Example: Tree [3,9,20,null,null,15,7] → [[3], [9,20], [15,7]]
Solution:
def levelOrder(root): if not root: return [] result = [] queue = [root] while queue: level = [] size = len(queue) for _ in range(size): node = queue.pop(0) level.append(node.val) if node.left: queue.append(node.left) if node.right: queue.append(node.right) result.append(level) return resultExplanation: Use BFS with queue, process each level. Time: O(n), Space: O(n)
Answer: [[3], [9,20], [15,7]]
Find two numbers that add up to target.
Example: nums = [2,7,11,15], target = 9 → [0,1]
Solution:
def twoSum(nums, target): hash_map = {} for i, num in enumerate(nums): complement = target - num if complement in hash_map: return [hash_map[complement], i] hash_map[num] = i return []Explanation: Use hash map to store seen numbers. Time: O(n), Space: O(n)
Answer: [0, 1]
Find longest palindromic substring in a string.
Example: “babad” → “bab” or “aba”
Solution:
def longestPalindrome(s): def expand(l, r): while l >= 0 and r < len(s) and s[l] == s[r]: l -= 1 r += 1 return s[l+1:r]
result = "" for i in range(len(s)): odd = expand(i, i) even = expand(i, i+1) result = max(result, odd, even, key=len) return resultExplanation: Expand around center for odd/even length palindromes. Time: O(n²), Space: O(1)
Answer: “bab” or “aba”
Merge overlapping intervals.
Example: [[1,3],[2,6],[8,10],[15,18]] → [[1,6],[8,10],[15,18]]
Solution:
def merge(intervals): intervals.sort(key=lambda x: x[0]) merged = [] for interval in intervals: if not merged or merged[-1][1] < interval[0]: merged.append(interval) else: merged[-1][1] = max(merged[-1][1], interval[1]) return mergedExplanation: Sort by start, merge if overlapping. Time: O(n log n), Space: O(n)
Answer: [[1,6],[8,10],[15,18]]
Check if parentheses string is valid.
Example: “()[]” → true, “([)]” → false
Solution:
def isValid(s): stack = [] mapping = {')': '(', '}': '{', ']': '['} for char in s: if char in mapping: if not stack or stack.pop() != mapping[char]: return False else: stack.append(char) return not stackExplanation: Use stack to match opening/closing brackets. Time: O(n), Space: O(n)
Answer: true for “()[]”, false for “([)]”
Design a real-time food delivery tracking system.
Requirements:
Solution:
Key Components:
Answer: Microservices architecture with WebSocket for real-time updates
Design a system to recommend restaurants to users.
Requirements:
Solution:
Key Components:
Answer: Hybrid recommendation system with collaborative and content-based filtering
Design a scalable order management system for food delivery.
Requirements:
Solution:
Answer: Event-driven microservices with Saga pattern for transactions
Design and implement a data structure for Least Recently Used (LRU) cache.
Requirements:
get(key): Return value if key exists, else -1put(key, value): Insert or update valueSolution (Python):
from collections import OrderedDict
class LRUCache: def __init__(self, capacity): self.cache = OrderedDict() self.capacity = capacity
def get(self, key): if key not in self.cache: return -1 self.cache.move_to_end(key) return self.cache[key]
def put(self, key, value): if key in self.cache: self.cache.move_to_end(key) self.cache[key] = value if len(self.cache) > self.capacity: self.cache.popitem(last=False)Time Complexity: O(1) for both operations
Space Complexity: O(capacity)
Find the top K most frequent elements in an array.
Example: nums = [1,1,1,2,2,3], k = 2 → [1,2]
Solution (Python):
from collections import Counterimport heapq
def topKFrequent(nums, k): count = Counter(nums) return heapq.nlargest(k, count.keys(), key=count.get)Time Complexity: O(n log k)
Space Complexity: O(n)
Given an array, return array where each element is product of all other elements.
Example: nums = [1,2,3,4] → [24,12,8,6]
Solution (Python):
def productExceptSelf(nums): n = len(nums) result = [1] * n
# Left pass for i in range(1, n): result[i] = result[i-1] * nums[i-1]
# Right pass right = 1 for i in range(n-1, -1, -1): result[i] *= right right *= nums[i]
return resultTime Complexity: O(n)
Space Complexity: O(1) excluding output array
Describe a time you solved a problem for a user or customer.
Answer Format (STAR):
Example: Fixed critical bug affecting order placement, reduced error rate by 90%, received positive user feedback
Give an example of taking responsibility for a project or task.
Answer Format (STAR):
Example: Led delivery tracking feature, coordinated team, delivered on time, improved user satisfaction
Describe a time you came up with an innovative solution.
Answer Format (STAR):
Example: Designed caching strategy reducing API latency by 70%, improved user experience
Zomato Placement Papers 2024
Practice Zomato placement papers 2024 with coding questions, DSA problems, and complete solutions.
Zomato Placement Papers 2025
Access latest Zomato placement papers 2025 with current year coding questions and updated patterns.
Complete Zomato guide
Return to complete Zomato placement papers guide with eligibility, process, and all question types.
Swiggy · Flipkart · Paytm · Phonepe · Meesho · Blinkit
Ready to practice Zomato coding questions? Focus on DSA fundamentals, system design, and Zomato values. Practice with Zomato placement papers and solve problems in Java, C++, Python, or Go.
Pro Tip: Practice medium to hard difficulty problems on LeetCode and HackerRank. Focus on optimal solutions and clear explanations. Use Zomato placement papers for realistic practice. Watch YouTube tutorials (Striver, Take U Forward) for detailed explanations of complex problems.