LinkedList

Insert element/node to sorted singly linked list in java (example/ algorithm)

Given the sorted linked list, we need to insert the element or node in the linked list such that linked list remains sorted. Suppose the sorted linked list as shown in Fig 1, We need to find the proper place before we need to insert the new element in the linked list, so that sorted order remains intact.

Find Intersection / join point of two single linked lists in java (example)

Given the two linked list, they are intersected at some node. We need to find out the intersection point of these two linked list. We have shown two linked list Linked list 1 and linked list 2, both linked lists are intersected at node 50. We need to find out the node 50 as per our problem statement.

Reverse single linked list in java using non recursive algorithm (examples)

Given the linked list, we need to reverse the linked list. The linked list is shown in Fig 1, the head is location at node 1. Each node in a list have reference to next node in the list. The node 1 will have reference to node 2 and node 2 will have reference to node 3 and so on. The linked list is null terminated or marker for end of linked list.

Scroll to Top