All Questions
5 questions
1
vote
2
answers
79
views
Alternate linked list merge
I wanted to merge 2 linked list’s elements alternatively. I counted the length of these 2 linked lists manually, then created a dummy-headed node to use for the merge. I am getting the errors "...
0
votes
1
answer
231
views
Why does the head pointer lose track of the linkedlist when overwriting the current head node
Comparing:
public static ListNode mergeTwoLists(ListNode list1, ListNode list2)
{
ListNode dummy = new ListNode(-1);
ListNode head = dummy;
while (list1 != null && ...
3
votes
1
answer
51
views
Cannot merge two sorted singly linked list, because of "type object '_Node' has no attribute '_element'"
I'm making my own merge_list function. I already made class SList(), and class _Node(). But when I enter two sorted lists in merge_list, merge_list function cannot compare the two node's values, with ...
-2
votes
1
answer
353
views
Code to Find the Merge Point of Two linked Lists
Forward Declaration of FindMergePoint()
int FindMergePoint(Node *Larger,int largeCount,Node *Smaller,int SmallCount);
Function which will count the length of both lists the according to the size ...
0
votes
1
answer
1k
views
Merging Linked List in Python [closed]
I'm trying to merge two sorted linked lists. I am able to do it by creating a node every time I add an element. However, I would like to do it without creating a new node but using the old one.
This ...