Tip 1 : Have more number of good projects than having many certifications
Tip 2 : Practice more types of questions on coding
Tip 3 : Prepare by writing more mock tests
Tip 1 : Make it short and effective
Tip 2 : Highlight your achievements
This was an MCQ and coding round. For MCQs this was the distribution : -
Apptitude ( 10 questions)
Maths (10 questions)
Coding Fundamentals (10 questions)
Given 100s of databases with random values. Each one may consist of millions of records and each one has infinite storage. We need to sort these databases globally. After sorting, any database can consist of any number of records (even allowed to store all of it in one database). Find a good way of doing this at such a large scale (millions of records).
My immediate response was to do an external merge-sort. This solution is correct but not at all optimal for our scenario. Then he asked to think a bit more. After a while, I told him that we need to create horizontal partitions of the distributed database (basically sharding, he wanted to hear the word sharding).
After saying this, I knew that I was going in the right direction and just had to find a good way to partition the data (finding the pivot points for bucketing).
This was also an MCQ and coding test. 30 MCQs were asked
• The left subtree of a node contains only nodes with data less than and equal to the node’s data.
• The right subtree of a node contains only nodes with data greater than and equal to the node’s data.
• Both the left and right subtrees must also be partial binary search trees.
Level 1:
All the nodes in the left subtree of 4 (2, 1, 3) are smaller
than 4, all the nodes in the right subtree of the 4 (5) are
larger than 4.
Level 2 :
For node 2:
All the nodes in the left subtree of 2 (1) are smaller than
2, all the nodes in the right subtree of the 2 (3) are larger than 2.
For node 5:
The left and right subtree for node 5 is empty.
Level 3:
For node 1:
The left and right subtree for node 1 are empty.
For node 3:
The left and right subtree for node 3 are empty.
Because all the nodes follow the property of a Partial binary
search tree, the above tree is a Partial binary search tree.
The solution is* to maintain just the stack top rather than the complete stack. Instead, I went towards a mini-maxing solution (takes O(n) space as well) at the time. Anyway, he told me the solution and then said that his next question was about mini-maxing that I just gave the solution to. This was supposed to be a very easy question and I messed it up.
Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
Which SQL keyword removes duplicate records from a result set?