GeeksforGeeks Question · Jul 2025 · San Francisco

Swiggy Interview Experience for SDE-1 | On-Campus 2021

Question Details

EligibilityBranch: Open To all (No branch bias at all) (B.Tech + idd)CGPA: 7.8Verdict: WaitlistOnline Test: There were total of 4 questions. (3dsa + 1sql)Platform: HackerR...

Full Details

Eligibility Branch: Open To all ( No branch bias at all) (B.Tech + idd) CGPA: 7.8

Verdict Waitlist Online Test: There were total of 4 questions. (3dsa + 1sql) Platform: HackerRank; Time: 90 mins https://www.geeksforgeeks.org/dsa/count-minimum-number-of-fountains-to-be-activated-to-cover-the-entire-garden/ Given a tree with each vertex having weight. In one operation you can choose any node, increase its weight by 1. Find minimum operations to convert tree into special tree. A special tree is tree such that for each vertex all of its adjecant vertex should have maximum difference <= 1. (Hint: Try out bfs) SQL Question Employee Table: {Emp id, Emp. Name, dept id} & Department Table {dept id, dept name} Result Expected: dept name and corresponding count of employees. [Note: if there is no employee working in dept then print "dept_name, 0".

Note dept name should be ordered decreasing by total employees working in that department, if it is same then in ascending dept id Emp_id, Emp_name, dept_id 1 hash 1 2 prash 1 3 cash 2 4 lash 3 dept_id dept_name 1 Mechanical 2 Maths 3 Electrical 4 Physics Output Expected Mechanical 2 Electrical 1 Maths 1 Physics 0 Solution: select d.name, count(d.id) from (department d inner join employee e on d.id = e.id) groupby d.id order by count(d.id) desc, d.name asc; select concat(d.name + " 0") from (department d left join employee e on d.id = e.id) where e.id is null order by d.name asc; Out of 295 appeared students, 30 got selected for interviews (Those Who have solved all the questions.) but you may expect yourself extended shortlist if you have not done only the SQ question. Interview 1(Technical): There were 2 interviewer. The round was a basic DSA round. Introduce Yourself Given an array of size 2n (last n characters are zero) convert it to specified form example [2, 3, 1, 5, 0, 0, 0, 0] convert it to [2, 2, 3, 3, 1, 1, 5, 5]

example [1, 4, 8, 0, 0, 0] convert it to [1, 1, 4, 4, 8, 8]

example [1, 0, 7, 0, 0, 0] convert it to [1, 1, 0, 0, 7, 7] it can be solved in O(1) space and O(1) time! She " miscommunicated" the question as https://www.geeksforgeeks.org/dsa/find-closest-greater-value-for-every-element-in-array/ and wanted me to find O(n)

solution which is not possible here! My advice will be 'keep talking what you are thinking' So accidentally I said we cant use stack. She asked why? I told a sample test case on the above question. Then she corrected the question to https://www.pepcoding.com/resources/online-java-foundation/stacks-and-queues/next-greater-element-official/ojquestion This can be solved in O(n) time using stack. So keep talking you will keep getting hints. https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/ Even though I have already solved this question thrice before the interview, still I could not code it. Please keep in mind that even the simpler questions seem to be pretty difficult in the tense situation of the interview. However I told the approach for the question (Recursion + left-right pointers) and they wrapped the interview, as we were already out of time. Any Questions for us? Interview 2(Technical): Tell me about yourself. Then we discussed my interest in Hockey. Explain to me one of the projects. I explained to him an Intern project on Recommender system+selenium(web scraping). Following cross-questions interviewer asked me. Why Selenium? Challenges you faced in this project? (tell your own story) What is the objective of this project? (I explained company purpose) What different algorithms you use in this project(Matrix Factorisation, Collaborative Filtering, etc) https://www.geeksforgeeks.org/dsa/given-a-string-find-its-first-non-repeating-character/ Initially I used two arrays of size 26. First to count frequency of characters 'a' to 'z', second of size 26 to store index where the character 'a-z' occurs first. He told me to get rid of the second array of size 26 and do it using only one array of size 26. I did it, using two times iterating the string. https://www.geeksforgeeks.org/aptitude/puzzle-bag-of-coins/ puzzle was asked. I acted as if I did not know and worked 5 mins on the question but he caught my acting. Tell me honestly if you know the puzzle already. LOL Any Questions for us?

Result Out of 25 students interviewed 3 students were selected for the main list, 1 student [b]me[/b] :( selected for the waitlist. The waitlist was never promoted to the main list. (Please note: There was no HR round) All the best guys!!

Free preview — 6 questions shown. Unlock all Swiggy questions →

About This Question

This is a reported interview question from a swiggy interview for a swe role (intern level) during the oa round reported in 2025.

It covers the following topics: Trees, Strings, Matrix, Binary Tree, Sql, Graph, Stack Queue, Recursion, Graphs, Arrays, Stack .

Difficulty rating: Easy

About Swiggy Interview Reports

This question was reported by a candidate who interviewed at Swiggy. LeakCode aggregates interview reports from 10+ sources, including 1Point3Acres, Glassdoor, LeetCode Discuss, Blind, Reddit, Indeed, and Nowcoder. Each report is translated where necessary, deduplicated against existing entries, and tagged by company, role, round type, and reporting date.

Use this question as one calibration data point, not a memorization target. Companies typically rotate their question pools every 2-4 months; the exact wording of a 2024 question may differ from what you encounter today. The underlying pattern, difficulty level, and follow-up depth at Swiggy are the higher-signal extractions to take from this report.

For broader preparation context, the Swiggy interview process typically includes a recruiter screen, one or two technical phone screens, and a 4-5 round on-site loop covering coding, system design (at L4+ levels), and behavioral. Reports tagged on LeakCode show the round-by-round distribution and typical difficulty calibration. To browse questions filtered by round type and seniority, use the company hub linked above.

How To Practice This Type of Question

Solve similar problems on LeetCode under timed conditions (25-35 minutes per medium difficulty). The goal is pattern recognition: recognize the underlying technique (sliding window, two-pointer, BFS, memoized recursion, etc.) within 60-90 seconds of reading. Strong candidates verbalize their hypothesis out loud before coding, then iterate based on feedback. Weak candidates dive into implementation immediately, lose time on the wrong approach, and run out of time for follow-ups.

Companies update their question pools every 2-4 months. The exact wording of any given question may have been retired by the time you interview. Focus your prep on the pattern, not the specific problem. The patterns that appear in Swiggy reports consistently are the ones worth investing in; one-off niche problems are not.

During Your Swiggy Round

Apply the standard interview round template: clarify requirements (2-3 minutes), state your approach out loud and confirm direction with the interviewer (3-5 minutes), code with narration (15-25 minutes), test with concrete examples including edge cases (5 minutes), discuss optimization or trade-offs if time permits (5 minutes). This template is universally accepted across FAANG and adjacent companies; deviating from it produces weaker interviewer feedback signal.

The single most predictive failure mode in Swiggy reports tagged "no hire": not asking clarifying questions. Interviewers are explicitly trained to weight this. Strong candidates ask 3-5 clarifying questions even on problems that look obvious; weak candidates dive into code immediately. The clarifying-question check is often the first signal recorded in the interviewer's written notes.