Skip to content

Zomato Placement Papers 2024 - Previous Year Questions & Solutions

Download Zomato placement papers 2024 PDF with previous year online assessment questions, solutions, and exam pattern analysis for 2024 recruitment cycle.

This page contains Zomato placement papers from 2024 with previous year questions, solutions, and exam patterns. Use these papers to understand the 2024 online assessment pattern and practice with actual questions from Zomato placement papers 2024.

Zomato Online Assessment 2024 Exam Pattern

Section titled “Zomato Online Assessment 2024 Exam Pattern”
SectionQuestionsTimeDifficultyFocus Areas
Coding Problem 1130 minMediumArrays, strings
Coding Problem 2130 minHardTrees, graphs, DP
Debugging130 minMediumCode fixes

Total: 3 problems, 90 minutes

Platform: HackerRank or Zomato’s internal platform
Languages Allowed: Java, C++, Python, Go
Success Rate: ~10-15% cleared OA and advanced to interviews

Zomato Placement Papers 2024 - Actual Questions & Solutions

Section titled “Zomato Placement Papers 2024 - Actual Questions & Solutions”

This section contains real coding questions from Zomato placement papers 2024 based on candidate experiences from GeeksforGeeks, LeetCode, and interview forums.

Question 1: Maximum Sum Subarray (Kadane’s Algorithm)

Section titled “Question 1: Maximum Sum Subarray (Kadane’s Algorithm)”
Q1: Find the maximum sum of contiguous subarray in an array of integers.

Problem Statement: Given an array of integers (both positive and negative), find the contiguous subarray with the largest sum.

Example:

Input: [-2, 1, -3, 4, -1, 2, 1, -5, 4]
Output: 6
Explanation: The subarray [4, -1, 2, 1] has the maximum sum of 6

Solution (Python):

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_sum
# Test case
arr = [-2, 1, -3, 4, -1, 2, 1, -5, 4]
print(max_subarray_sum(arr)) # Output: 6

Solution (Java):

public int maxSubArray(int[] nums) {
int maxSum = Integer.MIN_VALUE;
int currentSum = 0;
for (int num : nums) {
currentSum += num;
if (currentSum > maxSum) {
maxSum = currentSum;
}
if (currentSum < 0) {
currentSum = 0;
}
}
return maxSum;
}

Time Complexity: O(n)
Space Complexity: O(1)
Algorithm: Kadane’s Algorithm

Explanation: We maintain a running sum and reset it to 0 if it becomes negative. We track the maximum sum seen so far.

Question 2: Shortest Path in Weighted Graph (Dijkstra’s Algorithm)

Section titled “Question 2: Shortest Path in Weighted Graph (Dijkstra’s Algorithm)”
Q2: Find the shortest path from source to destination in a weighted graph.

Problem Statement: Given a weighted graph with n nodes and edges, find the shortest path from source node to destination node.

Example:

Graph:
Nodes: 0, 1, 2, 3
Edges: (0->1: 4), (0->2: 1), (1->3: 1), (2->1: 2), (2->3: 5)
Source: 0, Destination: 3
Output: 4 (Path: 0->2->1->3 with cost 1+2+1=4)

Solution (Python):

import heapq
def shortest_path(graph, start, end):
n = len(graph)
dist = [float('inf')] * n
dist[start] = 0
pq = [(0, start)]
while pq:
d, node = heapq.heappop(pq)
if node == end:
return d
if d > dist[node]:
continue
for neighbor, weight in graph[node]:
new_dist = d + weight
if new_dist < dist[neighbor]:
dist[neighbor] = new_dist
heapq.heappush(pq, (new_dist, neighbor))
return -1 # No path found
# Example usage
graph = {
0: [(1, 4), (2, 1)],
1: [(3, 1)],
2: [(1, 2), (3, 5)],
3: []
}
print(shortest_path(graph, 0, 3)) # Output: 4

Solution (Java):

import java.util.*;
public int shortestPath(List<List<int[]>> graph, int start, int end) {
int n = graph.size();
int[] dist = new int[n];
Arrays.fill(dist, Integer.MAX_VALUE);
dist[start] = 0;
PriorityQueue<int[]> pq = new PriorityQueue<>((a, b) -> a[1] - b[1]);
pq.offer(new int[]{start, 0});
while (!pq.isEmpty()) {
int[] curr = pq.poll();
int node = curr[0], d = curr[1];
if (node == end) return d;
if (d > dist[node]) continue;
for (int[] edge : graph.get(node)) {
int neighbor = edge[0], weight = edge[1];
int newDist = d + weight;
if (newDist < dist[neighbor]) {
dist[neighbor] = newDist;
pq.offer(new int[]{neighbor, newDist});
}
}
}
return -1;
}

Time Complexity: O((V + E) log V)
Space Complexity: O(V)
Algorithm: Dijkstra’s Algorithm using Priority Queue

Question 3: Binary Tree Level Order Traversal

Section titled “Question 3: Binary Tree Level Order Traversal”
Q3: Given a binary tree, return the level order traversal of its nodes’ values.

Problem Statement: Traverse a binary tree level by level, returning values at each level.

Example:

Tree:
3
/ \
9 20
/ \
15 7
Output: [[3], [9, 20], [15, 7]]

Solution (Python):

from collections import deque
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
def levelOrder(root):
if not root:
return []
result = []
queue = deque([root])
while queue:
level_size = len(queue)
level = []
for _ in range(level_size):
node = queue.popleft()
level.append(node.val)
if node.left:
queue.append(node.left)
if node.right:
queue.append(node.right)
result.append(level)
return result

Time Complexity: O(n)
Space Complexity: O(n)
Algorithm: BFS (Breadth-First Search)

Q4: Debug the following code that finds the second largest element in an array.

Buggy Code:

def find_second_largest(arr):
largest = arr[0]
second_largest = arr[0]
for num in arr:
if num > largest:
largest = num
elif num > second_largest:
second_largest = num
return second_largest

Issues:

  1. Doesn’t handle arrays with less than 2 elements
  2. Initializes second_largest incorrectly (should be float('-inf'))
  3. Doesn’t update second_largest when largest is updated

Corrected Code:

def find_second_largest(arr):
if len(arr) < 2:
return None # or raise exception
largest = max(arr[0], arr[1])
second_largest = min(arr[0], arr[1])
for i in range(2, len(arr)):
num = arr[i]
if num > largest:
second_largest = largest
largest = num
elif num > second_largest and num != largest:
second_largest = num
return second_largest if second_largest != float('-inf') else None

Key Fixes:

  • Handle edge cases (array size < 2)
  • Properly initialize second_largest
  • Update second_largest when largest changes
  • Handle duplicate values correctly

Hiring Volume

  • Total Hires: 200+ freshers
  • SDE-1: 180+ selections
  • Growth: 15% from 2023
  • Locations: Gurugram, Bengaluru

Salary Packages

  • SDE-1: ₹18-25 LPA
  • SDE-2: ₹28-35 LPA
  • 10% increase from 2023

Question Difficulty

  • Medium: 60% of questions
  • Hard: 40% of questions
  • Focus: DSA and system design
Q5: LRU Cache Implementation - 2024 Real Question

Problem: Design and implement a data structure for Least Recently Used (LRU) cache.

Solution (Java):

class LRUCache {
class Node {
int key, value;
Node prev, next;
Node(int k, int v) {
key = k;
value = v;
}
}
private Map<Integer, Node> cache;
private int capacity;
private Node head, tail;
public LRUCache(int capacity) {
this.capacity = capacity;
cache = new HashMap<>();
head = new Node(0, 0);
tail = new Node(0, 0);
head.next = tail;
tail.prev = head;
}
public int get(int key) {
Node node = cache.get(key);
if (node == null) return -1;
moveToHead(node);
return node.value;
}
public void put(int key, int value) {
Node node = cache.get(key);
if (node == null) {
Node newNode = new Node(key, value);
cache.put(key, newNode);
addToHead(newNode);
if (cache.size() > capacity) {
Node tail = removeTail();
cache.remove(tail.key);
}
} else {
node.value = value;
moveToHead(node);
}
}
private void addToHead(Node node) {
node.prev = head;
node.next = head.next;
head.next.prev = node;
head.next = node;
}
private void removeNode(Node node) {
node.prev.next = node.next;
node.next.prev = node.prev;
}
private void moveToHead(Node node) {
removeNode(node);
addToHead(node);
}
private Node removeTail() {
Node lastNode = tail.prev;
removeNode(lastNode);
return lastNode;
}
}

Time Complexity: O(1) for both operations, Space Complexity: O(capacity)

Q6: Word Break Problem - 2024 Real Question

Problem: Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-separated sequence of one or more dictionary words.

Example:

Input: s = "leetcode", wordDict = ["leet","code"]
Output: true

Solution (Java):

public boolean wordBreak(String s, List<String> wordDict) {
Set<String> wordSet = new HashSet<>(wordDict);
boolean[] dp = new boolean[s.length() + 1];
dp[0] = true;
for (int i = 1; i <= s.length(); i++) {
for (int j = 0; j < i; j++) {
if (dp[j] && wordSet.contains(s.substring(j, i))) {
dp[i] = true;
break;
}
}
}
return dp[s.length()];
}

Time Complexity: O(n²), Space Complexity: O(n)

Q7: Clone Graph - 2024 Real Question

Problem: Given a reference of a node in a connected undirected graph, return a deep copy (clone) of the graph.

Solution (Java):

public Node cloneGraph(Node node) {
if (node == null) return null;
Map<Node, Node> map = new HashMap<>();
Queue<Node> queue = new LinkedList<>();
queue.offer(node);
map.put(node, new Node(node.val));
while (!queue.isEmpty()) {
Node current = queue.poll();
for (Node neighbor : current.neighbors) {
if (!map.containsKey(neighbor)) {
map.put(neighbor, new Node(neighbor.val));
queue.offer(neighbor);
}
map.get(current).neighbors.add(map.get(neighbor));
}
}
return map.get(node);
}

Time Complexity: O(V + E), Space Complexity: O(V)

Q8: Longest Substring Without Repeating Characters - 2024 Real Question

Problem: Given a string s, find the length of the longest substring without repeating characters.

Example:

Input: s = "abcabcbb"
Output: 3
Explanation: The answer is "abc", with the length of 3

Solution (Java):

public int lengthOfLongestSubstring(String s) {
Map<Character, Integer> map = new HashMap<>();
int maxLen = 0;
int start = 0;
for (int end = 0; end < s.length(); end++) {
char ch = s.charAt(end);
if (map.containsKey(ch) && map.get(ch) >= start) {
start = map.get(ch) + 1;
}
map.put(ch, end);
maxLen = Math.max(maxLen, end - start + 1);
}
return maxLen;
}

Time Complexity: O(n), Space Complexity: O(min(n, m)) where m is charset size

Q9: Merge Two Sorted Lists - 2024 Real Question

Problem: Merge two sorted linked lists and return it as a sorted list.

Example:

Input: list1 = [1,2,4], list2 = [1,3,4]
Output: [1,1,2,3,4,4]

Solution (Java):

public ListNode mergeTwoLists(ListNode list1, ListNode list2) {
ListNode dummy = new ListNode(0);
ListNode current = dummy;
while (list1 != null && list2 != null) {
if (list1.val <= list2.val) {
current.next = list1;
list1 = list1.next;
} else {
current.next = list2;
list2 = list2.next;
}
current = current.next;
}
current.next = (list1 != null) ? list1 : list2;
return dummy.next;
}

Time Complexity: O(n + m), Space Complexity: O(1)

Q10: Valid Parentheses - 2024 Real Question

Problem: Given a string s containing just the characters ’(’, ’)’, ', ', ’[’ and ’]’, determine if the input string is valid.

Example:

Input: s = "()[]{}"
Output: true

Solution (Java):

public boolean isValid(String s) {
Stack<Character> stack = new Stack<>();
for (char c : s.toCharArray()) {
if (c == '(' || c == '{' || c == '[') {
stack.push(c);
} else {
if (stack.isEmpty()) return false;
char top = stack.pop();
if ((c == ')' && top != '(') ||
(c == '}' && top != '{') ||
(c == ']' && top != '[')) {
return false;
}
}
}
return stack.isEmpty();
}

Time Complexity: O(n), Space Complexity: O(n)

Key Insights from 2024 Zomato Online Assessment

Section titled “Key Insights from 2024 Zomato Online Assessment”
  1. Coding Section is Critical: Must solve 2-3 coding problems correctly to advance
  2. DSA Focus: Strong emphasis on arrays, trees, graphs, and dynamic programming
  3. Time Management: 2-3 problems in 90 minutes requires excellent speed and accuracy
  4. Debugging: Always included - practice debugging skills thoroughly
  5. System Design: Asked for SDE-1/2 roles, basic for freshers
  6. Optimal Solutions: Required - focus on time and space complexity
  7. Food Delivery Focus: Problems often relate to food delivery scenarios (matching, routing, recommendations)
  8. Success Rate: Only 10-15% cleared OA and advanced to interviews
  9. Platform: HackerRank or Zomato’s internal platform

Based on candidate experiences from 2024 Zomato interviews:

2024 Interview Process:

  1. Online Assessment (90 minutes): 2-3 coding problems + 1 debugging question
  2. Technical Phone Screen (45-60 minutes): Coding problems, algorithm discussions
  3. Onsite Interviews (4-5 rounds, 45-60 minutes each):
    • Coding rounds (2-3): Algorithms, data structures, problem-solving
    • System Design round: Food delivery systems for SDE-1+ roles
    • Behavioral round: Problem-solving approach, teamwork, impact

Common 2024 Interview Topics:

  • Coding: Arrays, strings, trees, graphs, dynamic programming, shortest path algorithms
  • System Design: Food delivery systems (order matching, restaurant recommendations, real-time tracking)
  • Debugging: Code fixes, logic errors, performance issues
  • Behavioral: Problem-solving examples, teamwork, impact on business metrics

2024 Interview Questions Examples:

  • Maximum Sum Subarray (Kadane’s Algorithm)
  • Shortest Path in Weighted Graph (Dijkstra’s Algorithm)
  • Design Zomato’s order matching system (System Design)
  • Design Zomato’s restaurant recommendation engine (System Design)

Success Tips:

  • Strong coding performance is essential - solve problems optimally
  • Practice debugging skills - this section is always included
  • Learn food delivery system design - order matching, recommendations, real-time tracking
  • Prepare examples demonstrating problem-solving and business impact
  • Practice explaining your thought process clearly
  • Focus on time management - 2-3 problems in 90 minutes

For detailed interview experiences, visit Zomato Interview Experience page.

  1. Master Coding Fundamentals: Focus on solving 2-3 coding problems correctly - arrays, trees, graphs, DP
  2. Practice Previous Year Papers: Solve Zomato OA papers from 2020-2024 to understand patterns
  3. Time Management: Practice completing 2-3 coding problems in 60 minutes, debugging in 30 minutes
  4. Debugging Practice: Practice debugging code - identify and fix logic errors, performance issues
  5. System Design Basics: Learn food delivery system design - order matching, recommendations for SDE-1+
  6. LeetCode Practice: Solve 200+ LeetCode problems focusing on arrays, strings, trees, graphs (medium-hard difficulty)
  7. Food Delivery Focus: Practice problems related to food delivery scenarios
  8. Mock Tests: Take timed practice tests to improve speed and accuracy
  9. Graph Algorithms: Master graph algorithms - shortest path, matching algorithms
  10. Dynamic Programming: Practice DP problems - frequently asked

Zomato 2025 Papers

Latest Zomato placement papers with current year DSA questions and solutions

View 2025 Papers →

Zomato Interview Experience

Real interview experiences from candidates who cleared Zomato placement

Read Experiences →

Zomato Online Assessment

Complete guide to Zomato online assessment format and preparation

View OA Guide →

Zomato HR Interview

Common HR interview questions and answers for Zomato placement

View HR Questions →

Zomato Main Page

Complete Zomato placement guide with eligibility, process, and salary

View Main Page →


Practice 2024 papers to understand Zomato’s pattern!