Merge two linked list javascript

How would you do a merged linkedlist from two other linked lists of the same … Read more Merge two linked list javascript

How would you do a merged linkedlist from two other linked lists of the same size?
Example:
List 1: Head –> 1 –> 7 –> 20 –> null
List 2: Head –> 4 –> 13 –> 2 –> null
New list with mergeLinkedLists:
Head –> 1 –> 4 –> 7 –> 13 –> 20 –> 2 –> null

I’m really strugling on this four hours…

sry if i’m expressing badly, first time using this plataform

Source: JavaSript – Stack Overflow


Categories: NewsTags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *