Coding test (Platform: Hacker Rank/ Proctored)
3 Coding questions (1.5hr):
- Sorting of structs based.
- Graph (DFS and connected components based) (This was a nice one).
- 0/1 Knapsack-based.
All questions were time-bound and if you jump ahead in sections, you can’t go back.
- Total candidates: 8 (2 were already selected in Arcesium and GS, so only 6 actually)
- Platform: Hacker Rank Code Pair
Round 1 (1 Hour Round):
- No Introduction (or anything).
- What is Class? Write a class and a constructor? Write copy constructor? Why copy constructor argument is by reference? Write templates? Static vs global variables? Can you use the global variable defined in some other CPP file in this file (how will you import the file)
- What is Paging? What is virtual memory? Translation of logical and physical addresses
- What are ACID Properties
- Given a linked list, change it in the form of 1->n->2->n-2->3->n-3 (in linear time and constant space).
- Given an array of numbers, find the max difference between two elements such that larger comes after smaller. (the question was stated differently and intimidatingly but he was the real meaning).
- Given a string of integers, replace all 0’s by ‘%%5’ efficiently. (No code, just approach) The answer interviewer wanted was: a. Count all zeroes.
- str.resize (str.length()+2*zeroes).
- Use two pointers one at the last of the memory space and one at end of the given string and compare characters and decrement (you got it, I believe).
- All other approaches were rejected.
Round 2 (2 out of 6 were rejected, 2 interviewers came):
- What are design patterns
- What are decorators in python
- How do events work in Tkinter? (probably asked because of my project)
- What is the diamond problem
- Full tree vs complete tree
- Compute the size of the complete tree better than O(n)
- What do you like in development
- What are datatypes in JS and routing in react (probably asked due to my project)?
Round 3 HR (on a phone call):
- Do you have any questions? No proper/ formal HR was taken of anyone, just a formality