Skip to content

Swiggy Placement Papers 2024 - Previous Year Questions & Solutions

Download Swiggy placement papers 2024 PDF with previous year online assessment questions, solutions, and exam pattern analysis.

This page contains Swiggy 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 Swiggy placement papers 2024.

Swiggy Online Assessment 2024 Exam Pattern

Section titled “Swiggy 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 Swiggy’s internal platform
Languages Allowed: Java, C++, Python, Go
Success Rate: ~10-15% cleared OA and advanced to interviews

Swiggy Placement Papers 2024 - Actual Questions & Solutions

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

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

Question 1: Stock Buy Sell to Maximize Profit

Section titled “Question 1: Stock Buy Sell to Maximize Profit”
Q1: You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve.

Problem Statement: You may complete as many transactions as you like (buy one and sell one share of the stock multiple times). You cannot engage in multiple transactions simultaneously (i.e., you must sell the stock before you buy again).

Example:

Input: prices = [7,1,5,3,6,4]
Output: 7
Explanation: Buy on day 2 (price = 1) and sell on day 3 (price = 5), profit = 5-1 = 4. Then buy on day 4 (price = 3) and sell on day 5 (price = 6), profit = 6-3 = 3. Total profit = 4+3 = 7.

Solution (Java):

public int maxProfit(int[] prices) {
int profit = 0;
for (int i = 1; i < prices.length; i++) {
if (prices[i] > prices[i - 1]) {
profit += prices[i] - prices[i - 1];
}
}
return profit;
}

Time Complexity: O(n)
Space Complexity: O(1)
Algorithm: Greedy approach - buy before every price increase

Question 2: Count Binary Strings Without Consecutive 1’s

Section titled “Question 2: Count Binary Strings Without Consecutive 1’s”
Q2: Count the number of binary strings of length n that do not contain consecutive 1’s.

Problem Statement: Given an integer n, return the count of binary strings of length n that do not contain consecutive 1’s.

Example:

Input: n = 3
Output: 5
Explanation: Valid strings: "000", "001", "010", "100", "101"

Solution (Java):

public int countBinaryStrings(int n) {
if (n == 0) return 0;
if (n == 1) return 2;
int[] dp = new int[n + 1];
dp[0] = 0;
dp[1] = 2; // "0" or "1"
dp[2] = 3; // "00", "01", "10"
for (int i = 3; i <= n; i++) {
dp[i] = dp[i - 1] + dp[i - 2];
}
return dp[n];
}

Time Complexity: O(n)
Space Complexity: O(n)
Algorithm: Dynamic Programming (Fibonacci pattern)

Q3: Given two strings text1 and text2, return the length of their longest common subsequence.

Problem Statement: A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characters.

Example:

Input: text1 = "abcde", text2 = "ace"
Output: 3
Explanation: The longest common subsequence is "ace" and its length is 3.

Solution (Java):

public int longestCommonSubsequence(String text1, String text2) {
int m = text1.length();
int n = text2.length();
int[][] dp = new int[m + 1][n + 1];
for (int i = 1; i <= m; i++) {
for (int j = 1; j <= n; j++) {
if (text1.charAt(i - 1) == text2.charAt(j - 1)) {
dp[i][j] = dp[i - 1][j - 1] + 1;
} else {
dp[i][j] = Math.max(dp[i - 1][j], dp[i][j - 1]);
}
}
}
return dp[m][n];
}

Time Complexity: O(m × n)
Space Complexity: O(m × n)
Algorithm: Dynamic Programming

Q4: You are given an array of k linked-lists lists, each linked-list is sorted in ascending order. Merge all the linked-lists into one sorted linked-list.

Problem Statement: Merge k sorted linked lists and return it as one sorted list.

Example:

Input: lists = [[1,4,5],[1,3,4],[2,6]]
Output: [1,1,2,3,4,4,5,6]

Solution (Java):

public ListNode mergeKLists(ListNode[] lists) {
if (lists == null || lists.length == 0) return null;
PriorityQueue<ListNode> pq = new PriorityQueue<>((a, b) -> a.val - b.val);
for (ListNode node : lists) {
if (node != null) {
pq.offer(node);
}
}
ListNode dummy = new ListNode(0);
ListNode current = dummy;
while (!pq.isEmpty()) {
ListNode node = pq.poll();
current.next = node;
current = current.next;
if (node.next != null) {
pq.offer(node.next);
}
}
return dummy.next;
}

Time Complexity: O(n log k) where n is total nodes, k is number of lists
Space Complexity: O(k)
Algorithm: Priority Queue (Min Heap)

Q5: Debug the code that rotates an array to the right by k positions.

Buggy Code:

public void rotate(int[] nums, int k) {
int n = nums.length;
for (int i = 0; i < k; i++) {
int temp = nums[n - 1];
for (int j = n - 1; j > 0; j--) {
nums[j] = nums[j - 1];
}
nums[0] = temp;
}
}

Issues:

  1. Inefficient for large arrays (O(nk) time complexity)
  2. Missing modulo operation for k > n
  3. Works but can be optimized

Optimized Solution:

public void rotate(int[] nums, int k) {
int n = nums.length;
k = k % n; // Handle k > n
// Reverse entire array
reverse(nums, 0, n - 1);
// Reverse first k elements
reverse(nums, 0, k - 1);
// Reverse remaining elements
reverse(nums, k, n - 1);
}
private void reverse(int[] nums, int start, int end) {
while (start < end) {
int temp = nums[start];
nums[start] = nums[end];
nums[end] = temp;
start++;
end--;
}
}

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

Q6: Design a system to track food orders and delivery status.

Requirements:

  • Place order with restaurant and items
  • Track order status (placed, preparing, out for delivery, delivered)
  • Assign delivery partner
  • Calculate estimated delivery time

Key Components:

  • Order Service: Handle order creation and status updates
  • Restaurant Service: Manage restaurant and menu
  • Delivery Service: Assign and track delivery partners
  • Notification Service: Send updates to users

Database Design:

  • Orders table: order_id, user_id, restaurant_id, status, created_at
  • OrderItems table: order_id, item_id, quantity, price
  • Delivery table: order_id, delivery_partner_id, status, estimated_time

API Endpoints:

  • POST /orders - Create new order
  • GET /orders/:order_id - Get order status
  • PUT /orders/:order_id/status - Update order status
  • GET /orders/:order_id/tracking - Get delivery tracking

Hiring Volume

  • Total Hires: 150+ freshers
  • SDE-1: 135+ selections
  • Growth: 12% from 2023
  • Locations: Bengaluru, Hyderabad

Salary Packages

  • SDE-1: ₹16-22 LPA
  • SDE-2: ₹24-30 LPA
  • 8% increase from 2023

Question Difficulty

  • Medium: 60% of questions
  • Hard: 40% of questions
  • Focus: DSA and system design

Key Insights from 2024 Swiggy Online Assessment

Section titled “Key Insights from 2024 Swiggy 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. System Design: Asked for SDE-1/2 roles, food delivery domain knowledge helpful
  5. Optimal Solutions: Required - focus on time and space complexity
  6. Food Delivery Focus: Problems often relate to food delivery scenarios (matching, routing, logistics)
  7. Success Rate: Only 10-15% cleared OA and advanced to interviews
  8. Platform: HackerRank or Swiggy’s internal platform

Based on candidate experiences from 2024 Swiggy interviews:

2024 Interview Process:

  1. Online Assessment (90 minutes): 2-3 coding problems
  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
  • System Design: Food delivery systems (order matching, delivery partner allocation, real-time tracking)
  • Behavioral: Problem-solving examples, teamwork, impact on business metrics
  • Food Delivery Knowledge: Order matching algorithms, logistics optimization, real-time systems

2024 Interview Questions Examples:

  • Array and string manipulation problems
  • Tree and graph problems
  • Design Swiggy’s order matching system (System Design)
  • Design Swiggy’s delivery partner allocation system (System Design)
  • Real-time tracking system design

Success Tips:

  • Strong coding performance is essential - solve problems optimally
  • Learn food delivery system design - order matching, logistics, 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
  • Understand logistics and matching algorithms

For detailed interview experiences, visit Swiggy 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 Swiggy OA papers from 2020-2024 to understand patterns
  3. Time Management: Practice completing 2-3 coding problems in 90 minutes
  4. System Design Basics: Learn food delivery system design - order matching, logistics for SDE-1+
  5. LeetCode Practice: Solve 200+ LeetCode problems focusing on arrays, strings, trees, graphs (medium-hard difficulty)
  6. Food Delivery Focus: Practice problems related to food delivery scenarios
  7. Mock Tests: Take timed practice tests to improve speed and accuracy
  8. Graph Algorithms: Master graph algorithms - matching, routing, optimization
  9. Dynamic Programming: Practice DP problems - frequently asked
  10. Logistics Knowledge: Understand logistics and matching algorithms for food delivery

Swiggy 2025 Papers

Latest Swiggy placement papers with current year DSA questions and solutions

View 2025 Papers →

Swiggy Interview Experience

Real interview experiences from candidates who cleared Swiggy placement

Read Experiences →

Swiggy Main Page

Complete Swiggy placement guide with eligibility, process, and salary

View Main Page →

Zomato Placement Papers

Similar food delivery company with comparable interview process

View Zomato Papers →

Swiggy 2025 Papers

Latest Swiggy placement papers with current year DSA questions and solutions

View 2025 Papers →

Swiggy Main Page

Complete Swiggy placement guide with eligibility, process, and salary

View Main Page →

Zomato Placement Papers

Similar food delivery company with comparable interview process

View Zomato Papers →


Practice 2024 papers to understand Swiggy’s pattern!