Swiggy | BarRaiser | SDE 2
Summary
I attended a BarRaiser interview for an SDE 2 position at Swiggy where I was asked a LeetCode DSA problem and a system design question.
Full Experience
DSA : https://leetcode.com/problems/asteroid-collision/description/ LLD: Design a notification system with options for :
- sms
- in app
- history of notifications
- scheduling of notifications
create class design, api structure ,db schema some discussions about design patttern used and schedulings with asynchronous processes in mind
#swiggy
Interview Questions (2)
Asteroid Collision
Given an array of integers representing asteroids moving in a one‑dimensional space, each asteroid moves either to the left (negative value) or to the right (positive value). When two asteroids meet, the smaller one (by absolute value) explodes; if they are equal, both explode. Return the state of the asteroids after all collisions.
Example:
Input: [5, 10, -5]
Output: [5, 10]
The problem requires using a stack to simulate the collisions.
Design Notification System
Design a notification system that supports:
- SMS notifications
- Email notifications
- In‑app notifications
- History of notifications
- Scheduling of notifications
The candidate was asked to create class designs, API structures, and a database schema. Discussion included design patterns and asynchronous processing for scheduling.