Department : CSE
CGPA : 9.62
This was an online round based on the hackerrank platform. It consisted of:
18 MCQs based on data structures, algorithms, aptitude, etc. Also (unexpected because OS wasn't taught till 4th sem) questions on operating system concepts.
2 coding questions:
1. A simple question on strings
2. Items are sold in units of 5, 6 and 10 (don't remember the exact numbers). Given an integer N, find out if N items can be bought.
(eg1: N = 21 = 5 + 6 + 10 => YES. eg2: N = 20. => NO)
NOTE: For all the interview questions, they asked me to write full, bug-free code (in any language) on paper once I arrived at an optimal solution (or a solution that the interviewer agreed upon).
Interview Round 1:
1.1. Given a sorted array and a key, find the frequency of the key in the array. Expected time complexity - O(log n)
1.2. Given an array containing inorder traversal of a BST, construct the BST that produces the array.
1.3. Questions about my summer internship project at IIT-B.
NOTE: For all the interview questions (except 2.1), they asked me to write full, bug-free code (in any language) on paper once I arrived at an optimal solution (or a solution that the interviewer agreed upon).
Interview Round 2:
2.1. Implement a stack in which (a) Push (b) Pop and (c) getMiddleElement all happen in O(1). You may use an auxiliary stack.
2.2. Given a tree (not a BST, neither the nodes have a link to their parent), and a pointer to some node in the tree, find it's inorder successor. I did it in O(n).
2.3. General questions about CS concepts like OOPs, some questions specific to C (like register, static variables)
2.4. Delete a node from a circular linked list, given the key inside the node (all edge cases handled).