Swiggy Interview Experience


interview

This post is to share my interview experience with Swiggy for a Senior Software Engineer position in Bangalore(May 2019). I was initially contacted by a recruiting agency who co-ordinated the interview process.


Round 1 - HackerRank

The first round was a 2-hour HackerRank test, which I was supposed to complete in a week or two.

The first question involved using a HashMap, and the second question involved Graphs. (I don’t remember the exact questions, sorry about that!). I would say the difficulty of the first question was that of a LC-easy, and took about 10 minutes to solve. The difficulty of the second was that of an LC-Hard (or LC-Medium, if you are familiar with graph algos), and took about 40 minutes for me to solve. After a day or two, I got a confirmation that I cleared this round and was invited for a hiring drive that weekend.


Round 2 - Object-oriented design

I arrived in the Swiggy office for the F2F rounds on a Saturday morning at 9.30. I found that there were more than 60 people who were invited to interview. (I braced myself for a long, exhausting day 😛)

At around 10 AM, everyone was given a sheet of paper with requirements for designing and implementing a Parking Lot . As you know, this is a pretty standard interview question to test OO skills. We were asked to code the solution on our laptops which will then be reviewed during one of the rounds. If I remember correctly, we were given around 90 minutes to implement our solution. I feel that this round is a tactic employed to ensure that all candidates are engaged at once, and don’t feel that they are being made to wait until they actually meet with an interviewer F2F.


Round-3 - Problem solving + Data Structures

The first F2F round was focused on problem-solving and coding. He started with the following:

Given an array, find the maximum possible sum, without choosing adjacent elements.

I initially gave him a recursive solution, and he asked to write down the recurrence relation on paper. We then talked about the time and space complexity of the solution, and how to optimize it through DP. However, I was not asked to code the solution.

He then extended the same for a binary tree and came up with the following question:

Given a binary tree, you cannot choose elements at successive levels (If a certain node is chosen, you cannot choose its children)

With some thought, I was able to write a recursive function to solve the problem. He reviewed it for a moment and seemed satisfied with the solution. He also mentioned that I was the first candidate to solve the problem that day. The interviewer was in the middle of a production issue, and was constantly interrupted by people pinging him. In spite of other things needing his attention, he was trying to help me solve the problems. Guess he was good at multi -tasking 😄 (Although I definitely felt sorry for him)


Round 4 - Low-level Design (LLD)

This round was with a more senior engineer, and was focused on low-level design (LLD). I was asked to design a pub-sub system(like kafka) without persistence.

The question was open ended, and he wanted me to expose the right interfaces and design the classes appropriately. I decided(after taking many hints from the interviewer) to implement 2 functions: subscribe (which takes the topic_name, and a function callback as param), and publish(which takes the topic_name and message as params and invokes the registered callback). I also did not use the constructs available in Java8 like the Consumer interface, that would’ve led to a much cleaner design.

It’s an understatement to say that I screwed up in this round. But if you had worked with libraries like RxJava, or had exposure to reactive/asynchronous programming, it would be relatively easier to solve such problems.


Round 5 (or 2.1) - Review of Object-oriented design solution

I would say this is an extension of Round-2, where an interviewer reviewed my code for the Parking Lot problem. It was pretty straight-forward - I used a whiteboard and walked him through the classes in my solution, and the relationships between them. He asked a couple of what-if questions, that tweaked the requirements a bit and I spoke about what changes I would make to the design to accommodate the tweaks.


Final Thoughts

Round-5 turned out to be the last round of the day, and it took until 7 PM in the night to get that far. I also had to pester the recruiter to schedule each of the above mentioned rounds (I guess I may have completed only 1 or 2 rounds, if I had not done that). I was asked to visit the office the week after, for my final rounds. I had other things planned for the week, and I told the recruiter about my situation who mentioned that he would co-ordinate with the recruiting agency. Here’s where things got a bit murky - There was clearly some mis-communication from the recruiting agency who weren’t able to schedule the final rounds though I had informed them of my availability multiple times. What happened on the interview day (engineers firefighting, spending ~10 hours in the office for 3 rounds) gave me a taste of what working there would entail. I started to think if it will be a good fit for me, and wasn’t keen to continue after that. This interview didn’t have a happy ending for me 😄 But there is no questioning the calibre of the engineers there, everyone I met was smart, empathetic and had worked on some really cool things - I just wish the recruitment/interview process was as good.


See Also