## Convert a Sorted Doubly Linked List to Balanced BST.

Objective: Given a sorted doubly linked list, convert it into Balanced binary search tree Input: A Doubly Linked List Example: Approach:

Objective: Given a sorted doubly linked list, convert it into Balanced binary search tree Input: A Doubly Linked List Example: Approach:

Objective: Given a Binary tree create Linked Lists of all the nodes at each depth , say if the tree has height k then create k linked lists. NOTE : This problem is very...

This post is the extension of – Two numbers represented by a linked list, Number Stored in REVERSE order Objective: Two numbers represented by a linked listwhere each node contains single digit. The digits...

We have similar post – Two numbers represented by a linked list, Number Stored in FORWARD order Objective: Two numbers represented by a linked list where each node contains single digit. The digits are...

This post is the extension of our earlier post Reverse a linked list. Here We have provided the better recursive solution in which we start reversing the list from the end. Objective: Reverse the...

Objective: Given a linked list, swap every kth node in that. If at the end of the list remaining nodes are less than k, leave them untouched. Input: A linked list, A number k....

Objective: Write a program to Delete a Node in the Middle of a linked list, Given only access to that Node Example: Original List : ->1->2->8->3->7->0->4 After Deleting the mid node (say 7) :...

Objective: Given a linked list and integer ‘n’, write an algorithm to find the nth node from the end in the Linked List. Example: Original List : ->1->2->8->3->7->0->4 Output : 3rd Element from the...

Objective: Write a program to remove the duplicates from an unsorted linked list Example: Input Linked List : 1->2->2->4->3->3->2 Output : 1->2->4->3 Input: An unsorted linked list Output: Linked list with no duplicates. Approach:...

Objective: Given Two linked list, check whether both list intersect each other, if yes then find the starting node of the intersection. Intersection point means end of one linked list is linked with some...

Objective: In a given linked list, check whether it contains the loop in it, if yes then find the Loop length and break the loop. Loop in a linked list means the last node...

Objective: Reverse the given linked list. Input: A Linked List Output: Reversed Linked List Example: Input : ->30->25->20->15->10->5 Reversed : ->5->10->15->20->25->30 NOTE : Click Reverse a Linked List – Part 2 to see the...

Objective: Given two sorted linked lists, objective is to merge both the lists in sorted order. Input: Two sorted linked list List a, List b. Example: List a : ->2->6->18 Listb: ->1->3->17->19 Merged List:...

Linked List- As the name suggests it’s a list which is linked. Linked List consist of Nodes Nodes are nothing but objects of a class and each node has data and a link to...

%d bloggers like this: