The whole interview process was divided into three rounds.
The first round was an online coding round of 1 hour and 30 minutes conducted on interview bit. There were a total of three questions and only two students were shortlisted from my college. The next round was on hangouts and that was an algorithmic round and they asked 1 question and they wanted first logic and then code. In the final round, they ask puzzles, questions related to my academic course and about my project.
Round 1 (Coding Round):
- You have given a matrix filled of size(n*m, 0< n, m <=1000 ) with 0 and 1. There were q( 0 < q >=100000 ) queries and in each query you will provide (i, j) and k, and you have to find the largest square with centre (i, j) and no. of 1’s in the matrix will be at most k. Hint :(binary search on largest matrix size)
- There is tree of N ( 0< N <=10^5) vertices and E edges (0< E <10^5) . You have been given q queries and in each query, you have given two vertices and you have to remove the edge between these two vertices and give the largest size of the tree from the resultant forest. Hint: (Disjoint set).
- There are N doors and N persons, the ith person stands on the ith door. There is a cost of entering in each door and also there are M roads connecting (a road connecting two doors) with some cost. You have to return the minimum cost for each person if they want to enter anyone of the door. (A person can enter the door at which he stands or he can move to some other door if the path exist and enter in that door ).
This was algorithmic round so he gave me 1 question.
- You have been given two arrays A and B, the first array consists of integer and the second array consists of 0 and 1. There is an operation given:- you can choose any adjacent bits in array B and you can toggle these two bits (00->11, 10->01, 11->00, 01->10) and you can perform this operation any no. of times. Output -> You have to return the sum of A*B+A*B…..A[N-1]*B[N-1]. This sum should be maximum.
- You have given two numbers n and m and you want to reach from n to m. You have given two operations a). You can double the number n and b). You can subtract 1 from n. Output -> minimum no. of operation. (eg-> n=6, m=21, output will be 5 => 6, 12, 11, 22, 21)
- Explain Inheritance.
- What is Interface?
- Search and insert in linear probing(hashing).
- Difference between thread and process.
- About your projects.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course. In case you are prepared, test your skills using TCS, Wipro, Amazon and Microsoft Test Serieses.