Question: Find pairs with given sum in doubly linked list Given a sorted doubly linked list of positive distinct elements, the task is to find
Find pairs with given sum in doubly linked list Given a sorted doubly linked list of positive distinct elements, the task is to find pairs in a doubly-linked list whose sum is equal to given value x. Example: Input: MyDoublyLinkedlist, obj; obi.insert(1); obi.insert (2); obi.insert (2); obi.insert (3); obi.insert (4); obi.insert (5); obi.insert (6); obi.insert (7); obi.pairsum(6); OUTPUT: c:\users\hira.naveed\documents\visual studio 2013\Projects\ConsoleApplication43\Debug\ConsoleApplication43.exe (1, 5) (2, 4) Press any key to continue..
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
