0
Is it possible to join two Doubly linked lists into a Single linked list?
If it is possible please give a short example.And if u can Pseudo code for how they can be joined..Thankyou in advance
5 Respuestas
+ 2
Yes but you will have to browse the old one the first list and add the elements of this one in the second with .add
+ 2
Not
I am said take elements of list1 then put in the list2
+ 1
THANKS can u give me like a short description step by step how the pointers will point to the next node and so on to join the two lists.I just need to know the algorithm only Thanks
0
If you have 02 tracks let's call list1 and list 2 And want to add the elements of list1 in list2 with list1.size () I have the size of the array then I use a strong mouth and for each element of list1 I do list2.add (list1.get (x)); X being the index of the for loop