public ListNode mergeSort(ListNode a,ListNode b)
    {
        if(a == null) return b;
        if(b == null) return a;
//        LinkedList.printList("ReadyForMerge : ",a);
//        LinkedList.printList("ReadyForMerge : ",b);
        ListNode temp;
        ListNode aHead = new ListNode(0);
        ListNode bHead = new ListNode(0);
        aHead.next = a;
        bHead.next = b;
        ListNode p1 = aHead;
        ListNode p2 = bHead;
        while(p1.next != null && p2.next != null)
        {

            if(p1.next.val >p2.next.val){
                temp = p2.next;
                p2.next = p2.next.next;
                temp.next = p1.next;
                p1.next = temp;
                p1 = p1.next;
            }
            else
                p1 = p1.next;
        }
        if(p1.next != null) p2.next = p1.next;
        if(p2.next != null) p1.next = p2.next;
//        LinkedList.printList("MergeRes : ",aHead.next);
        return aHead.next;
    }