Round 1: (Online Coding)
Online coding round on co-cubes platform. 3 Questions 75 mins. Questions are very easy.
- Given two arrays find the min in first array and max in the second array and return the product of the two elements(2 marks)
- Given a 2d matrix and a column we have to sort the rows of the matrix based on element present at that column in that row(3 marks)
- Link the nodes at same level in a binary tree(5 marks)
- Given a sorted string. Like aaaabbccc. You have to modify the string to a4b2c3. Constraints such as we should not traverse the string again. It should be in-place like we should not construct a new string. Solution : GeeksforGeeks Link
-
This is the first face to face Interview and The interviewer was very strict he was not at all helping me and also he was discouraging me.
- He gave me a easy question in a very complex manner. ultimately the question was just finding the minimum spanning tree.
- Check if a linked list is a palindrome. Without Altering the linked list. Traverse once. Constant extra space. O(n) complexity.
- Given a matrix that is sorted in row wise and column wise, Search for an element x. He is expecting a complexity in log scale.
- Implement c++ ’s atoi function
- Given two sorted linked list merge them into a single linked list. You are supposed to remove duplicates while merging you are not suppose to create any new node in the process. In single traversal.
- You are given an array where each element signify number of jumps that you can make from that position. You need to find out the minimum number of jumps required to reach the end of the array.
- Each course is having some dependencies on other courses. In a semester you can take any number of courses but for taking a course all its dependent courses should be taken. You need to find out minimum number of semesters needed to complete all the courses. Example: C, Basic data structures, c++(Depends on C), Advanced Data structures(depends on Basic ds), Java (depends on c,c++, Advanced Ds). You can complete all the courses in 3 semesters (Sem1: C,BDS; Sem2: c++,ADS; Sem3: Java)
- Wap to Reverse a linked list using recursion. ( He asked me to explain the solution with a recursive call stack)
- You are having N blocks of memory create two functions get and release. Function Get(x) takes x as input and it should assign x blocks of contiguous memory and return the index where the x starts. Function release takes the memory index and frees the memory.
- He about my Internship experience and work done at Paytm
- Why Microsoft?
- Why should we hire you?