Data Structure
From source code,code examples
Contents |
Arrays
- Simple matrix class
- An example of infinite recursion
- Array fields
- Array constructors
- Array class assign method
- Array class accessor methods
- Array class get and put methods
- Sieve of Eratosthenes
- Robust array allocation
- Coin-flipping simulation
- Closest-point computation
Link Lists
- Header file for linked list
- Implementation for linked list
- Implementation for cursor linked list
- Implementation for separate chaining
- The Link Class
- The LinkList Class
- Finding and Deleting Specified Links
- Linked-List Efficiency
- A Stack Implemented by a Linked List
- Java Code to Insert an Item in a Sorted List
- Efficiency of Sorted Linked Lists
- List Insertion Sort
- Doubly Linked Lists
- Linked list implementation of the list
- Linked list implementation of the list iterator
- Basic node stored in a linked list
- Implements a deterministic skip list
- Circular list example (Josephus problem)
- List reversal
- List insertion sort
- Circular-list class
- Solving the Josephus problem with circular lists
- Circular-list class with memory allocation
- ListNode class-template definition.
- List class-template definition.
- Manipulating a linked list.
Stacks
- Implementation for stack: array version
- Implementation for stack: list version
- The Towers of Hanoi
- Java Code for a Stack
- Stack Example: Reversing a Word
- Stack Example: Delimiter Matching
- Example of push_back with vectors
- Stack class-template definition.
- A simple stack program.
- Stack class template with a composed List object.
Strings
- Some hash functions for strings
- the naive algorithms
- Knuth-MORRIS-PRATT ALGORITHM
- String search
- anipulating strings
Queues
- Implementation for queue: array version
- Java code for a queue
- The Queue Class Without nItems
- Efficiency of Queues
- Java Code for a Priority Queue
- Efficiency of Priority Queues
- Java Code to Convert Infix to Postfix
- Queue implemented with STL list
- Basic node stored in binomial queues
- Implements a binomial queue
- Queue class-template definition.
- Queue-processing program.
Trees
- Test program for binary search
- Implementation for binary search tree
- Implementation for AVL tree
- Implementation for top-down splay tree
- AVL Tree with Graphics Display
- Binary tree Implementaion Insertion & Deletion
- Huffman algorithm
- Basic node stored in AVL trees
- Implements an AA-tree
- Basic node stored in unbalanced binary search trees
- Implements an unbalanced binary search tree
- Recursive tree traversal
- Preorder traversal (nonrecursive)
- Level-order traversal
- Computation of tree parameters
- Quick tree-print method
- Construction of a tournament
- Construction of a parse tree
- treeNode class-template definition.
- TRee class-template definition.
- Creating and traversing a binary tree.
Graphs
- DIJIKSHA'S ALGORITHM IMPLEMENTATION
- Shortest path program using STL
- Shortest path program not using STL
- Depth-first search
- Breadth-first search
Searching
- BinarySearch class definition.
- BinarySearch class member-function definition.
- BinarySearch test program.
Sort
- RECURSIVE BALANCED QUICK SORT
- Radix Sort
- Efficiency of the Bubble Sort
- Java Code for Selection Sort
- Efficiency of the Selection Sort
- Java Code for Insertion Sort
- Efficiency of the Insertion Sort
- Java Code for Sorting Objects
- Implements a binary heap
- xample of array sort with driver program
- Key-indexed counting
- Item interface
- Class for sort methods
- Item ADT interface
- Sortable-array ADT interface
- Sort driver for sortable arrays
- Sample implementation of sortable-array ADT
- ADT implementation for integer items
- Sample record class
- ADT implementation for record items
- ADT implementation for string items
- Selection sort
- Insertion sort
- Bubble sort
- Visualizing a sorting algorithm
- Animating a sorting algorithm
- Animating a sorting algorithm
- Shellsort
- Linked-list selection sort
- Quicksort
- Partitioning
- Nonrecursive quicksort
- Improved quicksort
- Quicksort with three-way partitioning
- Selection
- Nonrecursive selection
- Merging
- Abstract in-place merge
- Top-down mergesort
- Mergesort with no copying
- Bottom-up mergesort
- Linked-list merge
- Top-down list mergesort
- Bottom-up list mergesort
- Array implementation of a priority queue
- Bottom-up heapify
- Top-down heapify
- Heap-based priority queue
- Sorting with a priority queue
- Heapsort
- Full priority-queue ADT
- Unordered doubly linked list priority queue
- Doubly linked list priority queue (continued)
- Priority-queue ADT interface for index items
- Index-heap?based priority queue
- Joining of two equal-sized power-of-2 heaps
- Insertion into a binomial queue
- Removal of the maximum in a binomial queue
- Joining (merging) of two binomial queues
- Binary quicksort
- MSD radix sort
- Three-way radix quicksort
- LSD radix sort
- Perfect shuffle and perfect unshuffle
- Batcher's odd?even merge (recursive version)
- Batcher's odd-even merge (nonrecursive version)
- Batcher's odd?even sort (nonrecursive version)
- In-place rearrangement
- MergeSort class definition.
- MergeSort class member-function definition.
- MergeSort test program.
Compound Data Structures
- Adjacency-matrix graph representation
- Adjacency-lists graph representation
- A two-dimensional array of lists
Abstract Data Types
- Complex numbers driver (roots of unity)
- ADT interface for complex numbers
- ADT implementation for complex numbers
- Queue client program (queue simulation)
- Clonable queue ADT interface
- Linked-list implementation of a clonable queue
- ADT interface for polynomials
- Polynomial client (binomial coefficients)
- Array implementation of polynomial ADT
- Pushdown-stack ADT interface
- Postfix-expression evaluation
- Infix-to-postfix conversion
- Array implementation of a pushdown stack
- Linked-list implementation of a pushdown stack
- Generic pushdown stack
- Adapter class for stack of integers
- Equivalence-relations ADT interface
- Equivalence-relations ADT client
- Equivalence-relations ADT implementation
- Abstract class for equivalence-relations ADT
- FIFO queue ADT interface
- FIFO queue linked-list implementation
- FIFO queue array implementation
- Stack with index items and no duplicates
| Algorithms Categories | |||

