In this article, we will discuss an algorithm on how to detect a loop in a linked list. So, in a given linked list, check whether it contains the loop in it, if yes then …
In this article, we will discuss another algorithm related to the singly linked list, how to remove duplicates from the unsorted singly linked list. A singly linked list has several nodes, and each node in …
In this article, we will discuss how to check a singly linked list is palindrome or not without using any extra space. As we know that a singly linked list has several nodes, and each …
In this article, we will discuss how to print nodes at k distance from the root of a binary tree. The trees are hierarchical data structures unlike Arrays, Linked Lists, Stack and queues, which are …
In this article, we will discuss how to delete a given node from the singly linked list. Given a pointer to a node to be deleted but we don’t have a pointer to head node. …
In this article, we will discuss how to reverse linked list in java. Iterative and Recursive there are two approaches, we can use to find the solution to this problem. As we know that, a …
In this article, we will discuss how to find the middle element in a linked list. A linked list has several nodes, and each node in the list has the content and a pointer to …