
Ola Interview Experience for Fresher SDE - 1, Sep 2019
Interview Process
Telephonic
This round was telephonic round. The interview lasted for approximately 45 minutes. The interviewer asked me three coding questions. I hustled a bit on 3rd question but after a hint was able to solve it.
Given a linked list, reverse alternate nodes and append them to the end of the list. Extra allowed space is O(1)
Examples:
Input: 1->2->3->4->5->6
Output: 1->3->5->6->4->2
Explanation: Two lists are 1->3->5 and 2->4->6,
reverse the 2nd list: 6->4->2.
Merge the lists
...
It depends on what traversals are given. If one of the traversal methods is Inorder then the tree can be constructed, otherwise not.
There are 3 ants sitting on three corners of a triangle. All ants randomly pick a direction and start moving along edge of the triangle. What is the probability that any two ants collide?