C Program to Implement Adjacency List

This is a C Program to implement Adjacency List. An array of linked lists is used. Size of the array is equal to number of vertices. Let the array be array[]. An entry array[i] represents the linked list of vertices adjacent to the ith vertex. This representation can also be used to represent a weighted … Read more

advertisement

C Program to Implement Xor Linked List

This is a C Program to implement XOR list. An XOR linked list is a data structure used in computer programming. It takes advantage of the bitwise XOR operation to decrease storage requirements for doubly linked lists. Here is source code of the C Program to Implement Xor Linked List. The C program is successfully … Read more

advertisement

C Program to Implement Skip List

This is a C Program to implement Skip List. The idea is simple, we create multiple layers so that we can skip some nodes. The worst case time complexity is number of nodes on “express lane” plus number of nodes in a segment (A segment is number of “normal lane” nodes between two “express lane” … Read more

advertisement

C Program to Implement Vlist

This is a C Program to implement VList. VList is a persistent data structure that combines the fast indexing of arrays with the easy extension of singly-linked lists. Like singly-linked they are persistent, and elements can be added to or removed from the front in constant time. Here is source code of the C Program … Read more

advertisement

C Program to Implement Doubly Linked List using Singly Linked List

This C Program implements doubly linked list using singly linked list. It makes use of 2 pointers, one points at the current node, other points at the head. When user requests to move back, the pointer from head travels to a previous node of the current pointer. The pointer to previous node is the resulting … Read more

advertisement

C Program to Find Intersection and Union of Two Linked Lists

This C Program finds the intersection and union of 2 linked lists. Intersection is a set of elements that are common in both lists while union is a set of all unique elements in both the lists Here is a source code of the C program finds the intersection and union of 2 linked lists. … Read more

advertisement

C Program to Find Nth Node from End of Linked List

This C Program prints the Nth node from the last node of a linked list. The approach used is to first point a pointer to a node which is N nodes ahead from the head. Then, move the Nth pointer and head pointer one node at a time till the Nth pointer has reached to … Read more

advertisement

C Program to Segregate Even and Odd Nodes in a Linked List

This C Program modifies the linked list such that all even numbers appear before all the odd number in the modified linked list. Here is a source code of the C program that modifies the linked list such that all even numbers appear before all the odd number. The C program is successfully compiled and … Read more

advertisement

C Program to Support Arbitrary Precision Arithmetic

This C Program creates a support for infinite precision arithmetic which allows storage of large integers which is beyond the range of the integral limit. C is architecture dependent so primitive data type such as int is not capable of storing large integral values. So we make use of linked list in order to create … Read more

advertisement

C Program to Convert Binary Tree to Singly Linked List

This C Program converts a binary tree into a singly linked list by Breadth first search algorithm. We use this algorithm for traversing level by level Here is a source code of the C program that converts a binary tree into a singly linked list. The C program is successfully compiled and run on a … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & technical discussions at Telegram SanfoundryClasses.