Interview Experience of Flipkart SDE-1

Job Profile – SDE1

Location – Bangalore

No. of Interviews – 4 ( 1 Coding, 2 Technical, 1 Hiring Manager)

First Round: 2 coding questions on HackerRank (90 minutes).

Q1) Given a matrix of n*n. Each cell contains 0,1, - 0 denotes there is no diamond but there is a path. 1 denotes there is a diamond at that location with a path. -1 denotes that the path is blocked.
Now you have started from 0,0 and reached the last cell & then return back to 0,0 collecting the maximum no of diamonds.
While going to the last cell you can move only right and down.
While returning back you can move only left and up.

Q2) Given an array of integers, you find the range l,r such that and operation of the largest two elements in that range is maximum.
For example:


6 1 6


1 3

You have to print lexicographically the smallest range.

After this round 23 students got shortlisted for interviews.

Second Round: Around 45 minutes (Face-to-Face)
He starts with an icebreaker question. Tell me something about yourself.
Then he moved to some coding questions.

Q1.) Given a 2D array, find the maximum sum subarray in it.

There is a stream of integers coming. At any given point in time, you have to tell the median of numbers. I gave three solutions to this problem using hashmap, sorting, and self-balancing augmented binary tree. He was satisfied with my solution.

Q2.) He then asked me about the binary index tree (Fenwick tree). He went deep into the concepts related to Fenwick Tree. The stock price of each day is given. You have to find the maximum profit you can make by buying or selling these stocks.

Third Round: Around 45 minutes (Face-to-Face)

He asks me some questions about my projects. Then he asked me some coding questions.

Q1.) Given a 2D array containing 0 & 1. 0 denotes the water body & 1 denotes land you have to tell the total no of islands. You can use BFS or DFS to solve this question. He asked me to write the full code for this problem.

LRU implementation. Check my code on boundary conditions.

Q2.) You have 100 documents each containing 100 words. You have to make a disjoint set such that each set contains the same document. By same documents, he meant documents containing the same words but can be in any order.
For the solution, I first thought of using the Trie method but then he asked me to optimize my code. Then I used a set and various data structures to solve this question.

Hiring Manager Round: Around 1 hour (Face-to-Face)

  • He asked me some HR questions like your bad and good experiences in college.

  • Why should we hire you??

  • Why should we not hire you??

  • Then he ask me to explain polymorphism to my grandmother??

  • Then he ask me normalization in dbms , why do we need normalization??

  • What are the various normalization forms??Explain them??

  • What is primary key ,candidate key And super key??

  • Given a binary tree you have to print the outer boundary of tree??

The overall Interview experience was good and they made me an offer.