Some Important Linear Data Structures- at a glance To go through the C program / source-code, scroll down to the end of this pageCircular linked list is a more complicated linked data structure. In this the elements can be placed anywhere in the heap memory unlike array which uses contiguous locations. Nodes in a linked list are linked together using a next field, which stores the address of the next node in the next field of the previous node i.e. each node of the list refers to its successor and the last node points back to the first node unlike singly linked list. It has a dynamic size, which can be determined only at run time. Related Tutorials :
Performance1. The advantage is that we no longer need both a head and tail variable to keep track of the list. Even if only a single variable is used, both the first and the last list elements can be found in constant time. Also, for implementing queues we will only need one pointer namely tail, to locate both head and tail. 2. The disadvantage is that the algorithms have become more complicated. Basic Operations on a Circular Linked ListInsert – Inserts a new element at the end of the list. Delete – Deletes any node from the list. Find – Finds any node in the list. Print – Prints the list. Complete tutorial with examples (Source code and MCQ Quiz below this)Circular Linked List - C Program source code#include<stdio.h>
Related Visualizations (Java Applet Visualizations for different kinds of Linked Lists) :Lists : Linear data structures, contain elements, each of
which point to the "next" in the sequence as demonstrated in the
examples below ( Simple, Circular and Double Linked Lists are some
common kinds of lists ) . Additions and removals can be made at any
point in the list - in this way it differs from stacks and queues.
1. Simple Linked Lists - A Java Applet Visualization
|
Arrays : Popular Sorting and Searching Algorithms |
| ||
Selection Sort | Shell Sort | ||
Heap Sort | Binary Search Algorithm | ||
Basic Data Structures and Operations on them | |||
Single Linked List | Double Linked List | ||
Tree Data Structures | |||
Binary Search Trees | Heaps | Height Balanced Trees | |
Graphs and Graph Algorithms | |||
Depth First Search | Breadth First Search | Minimum Spanning Trees: Kruskal Algorithm | Minumum Spanning Trees: Prim's Algorithm |
Dijkstra Algorithm for Shortest Paths | Floyd Warshall Algorithm for Shortest Paths | Bellman Ford Algorithm | |
Popular Algorithms in Dynamic Programming | |||
Dynamic Programming | Integer Knapsack problem | Matrix Chain Multiplication | Longest Common Subsequence |
Greedy Algorithms | |||
Elementary cases : Fractional Knapsack Problem, Task Scheduling | Data Compression using Huffman Trees |