Skip to content

Swiggy Coding Questions 2025-2026 | Placement Interview Problems with Solutions

Swiggy coding interview questions with detailed solutions 2025-2026. Practice Swiggy placement coding problems, DSA questions, and programming challenges asked in recent hiring rounds.

Practice coding interview questions for e-commerce and retail tech companies.

def two_sum(nums, target):
seen = {}
for i, num in enumerate(nums):
if target - num in seen:
return [seen[target - num], i]
seen[num] = i
return []
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 merged
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)
class Trie:
def __init__(self):
self.root = {}
def insert(self, word):
node = self.root
for char in word:
if char not in node:
node[char] = {}
node = node[char]
node['#'] = True
def search_prefix(self, prefix):
node = self.root
for char in prefix:
if char not in node:
return []
node = node[char]
return self._collect_words(node, prefix)
def _collect_words(self, node, prefix):
words = []
if '#' in node:
words.append(prefix)
for char, child in node.items():
if char != '#':
words.extend(self._collect_words(child, prefix + char))
return words
def check_inventory(orders, inventory):
"""
Check if orders can be fulfilled with current inventory
"""
required = {}
for order in orders:
for item, qty in order['items'].items():
required[item] = required.get(item, 0) + qty
for item, qty in required.items():
if inventory.get(item, 0) < qty:
return False, item
return True, None
def max_subarray(nums):
max_sum = current_sum = nums[0]
for num in nums[1:]:
current_sum = max(num, current_sum + num)
max_sum = max(max_sum, current_sum)
return max_sum
def is_valid(s):
stack = []
mapping = {')': '(', '}': '{', ']': '['}
for char in s:
if char in mapping:
top = stack.pop() if stack else '#'
if mapping[char] != top:
return False
else:
stack.append(char)
return not stack

Interview Experience

Real interview experiences.

Preparation Guide

Complete preparation strategy.


Practice these problems!

Last updated: February 2026