I dont think it can be done without reversing the linked list!! On Aug 25, 2:54 pm, Raj N <[email protected]> wrote: > Input : Two large singly linked lists representing numbers with most > significant digit as head and least significant as last node. > Output: Difference between the numbers as a third linked list with > Most significant digit as the head. > Eg: > --- > Input: > A = 5->4->2->0->0->9->0->0 > B = 1->9->9 > Output: > C = 5->4->2->0->0->7->0->1 > Required complexity : > O(n) > Constraint: > Reversing linked list is NOT allowed
-- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
