C Program to Delete Linked List

In my previous article I showed how to create a linked list. Now if you no longer need the linked list in your program, you have to delete that. Otherwise, it will lead to memory leak. Here we’ll see how to delete linked list completely. C Function to Delete Linked List This function takes the … Continue reading “C Program to Delete Linked List”

How to Remove Duplicate Entries from Sorted Linked List using C Programming

Here we’ll see how to remove duplicate entries from sorted Linked List using C Programming. In the previous article we saw how to remove duplicate entries from a generic linked list which will work here for sorted linked list also. But we’ll see how to take advantage of the sorted list and improve the performance … Continue reading “How to Remove Duplicate Entries from Sorted Linked List using C Programming”

How to Remove Duplicate Entries from Linked List?

Here we’ll see how to write C program to remove duplicate entries from linked list. Linked list contains duplicate entries when nodes with same value appear multiple times in the list. In the above Linked list entries, 43, 24 and 5 appeared more than once. We’ll write a C program to remove these duplicate elements … Continue reading “How to Remove Duplicate Entries from Linked List?”

C Program to Implement a Singly Linked List

What is Singly Linked List? Linked List is a collection of interconnected nodes that together represent a sequence. Connected node means if you have access of a node, then you can get access to the next nodes even though they are not located in consecutive memory locations. For singly linked list, you can traverse the … Continue reading “C Program to Implement a Singly Linked List”

Detect and Remove Loop in Linked List in C

What is Loop in Linked List? In a standard singly linked list, the last node always points to NULL. If you traverse such a linked list, the traversal will end at the last node. That means you can not go anywhere from the last node. Here is an example of a standard linked list. Loop … Continue reading “Detect and Remove Loop in Linked List in C”

1
2
2
3
3
1