Given that integers are being read from a data stream. Find median of all the elements read so far starting from the first integer till the last integer. This is also...

Share

Given that integers are read from a data stream. Find median of elements read so for in efficient way. For simplicity assume there are no duplicates. For example, let...

Share

You are given a Double Link List with one pointer of each node pointing to the next node just like in a single link list. The second pointer however CAN point to any ...

Share

Given a singly linked list, swap kth node from beginning with kth node from end. Swapping of data is not allowed, only pointers should be changed. This requirement m...

Share

Given a 2D array, print it in spiral form. See the following examples.
Examples:
Input:
1 2 3 4
5 6 7 8
9 10 11 12
...

Share

Given a Binary Tree, print the nodes level wise, each level on a new line.
Output:
1
2 3
4 5
Recommended: Please solve it on “PRACTICE” first, before...

Share