Round 1: (MCQ’s and 2 coding questions)
An online test was conducted consisting of 20 MCQ’s and 2 coding questions. MCQ’s consisted of data structures, OS and DBMS concepts. They were quite easy. 2 coding questions were:
- Given a linked list where every node represents a head of another linked list and contains two pointers of its type (all linked list are sorted). First, Pointer to next node in the main list and Second, Pointer to a linked list where this node is head.Write flatten function to flatten the lists into a single sorted linked list.
- Print vertical sum of all the axis in the given binary tree.
Round 2: (F2F Interview)
Given number N<10^7 and 0=<K<=9 (a digit).Find the total number of occurrences of K from 1 to N. Example N=11 and K=1 then ans=4. I was asked to write the code.I solved it in complexity of O(number of digits in N) using DP.
Round 3: (F2F Interview)
- Given a binary tree to be passed through a network. How to pass this tree in minimum space.It was an open ended question and he asked me for many solutions and finally asked me to write the code.
- Given two sorted list, find the Kth largest element from the combined sorted list.
Round 4: (F2F Interview)
- Given array of integers, find 1st non repeating element and write code.
- He asked me some Operating system question- what is difference between malloc and declaring an array, what is memory leak, garbage collection, main difference between C and C++ related to Memory allocation. There were some more, I am not able to recall all of them.
- Given N, find total number of Zeros at the end of N!. (of course with proof).
- Given a linked list with every node containing two pointers next and random. next points to next element and random points to any random element in linked list. Create a copy of this list. He asked me to write the code.
Round 5: (F2F Interview with manager)
- Discussion about only one of my projects. More than technicality of project he concentrated on my role in project, Teamwork, idea etc.
- OS concepts like difference between threads and process.
- Given that main memory is very cheap,what is need of virtual memory.
- Cryptography concepts like what is difference between hashing data and encrypting data. What are different types of encryption schemes.
- Given a binary tree and a SUM, print all the path from root whose sum = SUM.
- He asked me the same question-: Given a binary tree to be passed through a network. How to pass this tree in minimum space. So, he just asked me discuss the approach.
- Given a sorted array (elements may or may not repeat) and number Find the starting and ending index of X in array. if X is not present in array return -1,-1. He asked me to write code.
All F2F round took around 1 hr and 15 mins.
Finally after a long long wait of 7 hours I was hired along with my 3 colleagues ...!!!
No comments:
Post a Comment