Swiggy | SDE-2 | Bengaluru | March 2022 [Reject]
Anonymous User
1570

Status: B.Tech
Position: SE at JPMC
YOE : 2 and 8 months
Location: Pune

Online Assessment :
Got same questions as below
https://leetcode.com/discuss/interview-question/1415530/Swiggy-Online-Assessment-Questions-SDE-II

Machine Coding Round:
This meant to be machine coding round but interviewer started asking DSA problems. He asked following 2 problems

  1. Given a binary string consisting of 0s and 1s. You can choose 2 indices L and R such that all the characters between L & R are flipped. Your aim is to perform AT MOST one operation such that in the final string, the number of 1s is maximized. If you don't want to perform the operation, return an empty array. Else, return an array consisting of two elements denoting L and R. If there are multiple solutions, return the lexicographically smallest pair of L and R
  2. Zigzag Tree traversal

I wasn't able to solve first one. Solved second one.
Interviewer was rude and hated python so much. At one point he even said "I don't give a sh*t about python"

DSA round:
Interviewer directly started with question without even an introduction. Felt like he was there to only reject me. He asked following 2 problems.

  1. Given a square chessboard of N x N size, the position of Knight (x) and position of a target(Y) is given. We need to find out the minimum steps a Knight will take to reach the target position.
  2. Given a binary tree, find whether it is possible to cut a binary tree from 1 branch such that 2 subtrees have equal sum.

Both were very hard problems for me.

Overall it was bad experience. Interviewers were not at all friendly and sometimes were rude.

*This is my first leetcode post please let me know if there are any corrections required. Thank you. *

Comments (1)