Linked List

Write a program to implement XOR linked list

You are given a doubly linked list with one pointer of each node pointing to the next node just as in single linked list. The second pointer can point to any of the node in the linked list. Write a program to copy the above list in O(n) time

Write a function sorted insert which inserts the node into the correct sorted position in the given list.

You will be given the address of the head of a link list and a random number generator ( generates between 0 & 1). You have to return a node from the list randomly using the random no. such that list should be traversed only once.

Write a function "sorted merge" which takes two lists, each of which is in increasing order, merge these two lists into one lists which is in increasing order.