C++ Programming Code Examples
C++ > Data Structures Code Examples
Using Templates so that any type of data can be stored in stack without multiple defination of class. Contains "Location of Topmost data" pushed onto stack. Sets the top location to -1
In this, includes the inserting a node, deleting a node, recursive tree traversal, non-recursive Tree Traversal, finding the minimum and the maximum, leftchild, rightchild, copy a tree to
C++ 'Binary Search Tree' insertion & deletion, finding an element, finding min element, max element, left child, right child, "recursive" and "nonrecursive" traversals, finding the number
Function to insert a node in the tree. Inorder recursive & nonrecursive traversal. 'Preorder' recursive & nonrecursive traversal. 'Postrder' recursive traversal. Postorder non recursive
Program sample, using a stack data strucure, computing whether the given "Parantheses" expression is 'valid' or not by check whether each parentheses is closed and nested in the
Linking nodes in binomial heap. Create nodes in binomial heap and Insert nodes in binomial heap. Union nodes in "Binomial Heap". Merge nodes in binomial heap. And display binomial
Number of bits in the Bloom filter. Number of bits set per Mapping in Filter. Table of "8-bit" CRC32 remainders. Bloom filter array of M/8 bytes. Number of bytes in Bloom filter. Main
'Memory allocated' for node dynamically and inserts element at beginning. Inserts elemnet at last. Inserts element at position and delete node at particular position. Update value of a
Enter the element and "Insert element" after position. Print: "list is empty" and nothing to delete. Enter the element for deletion. Enter the element to be searched. "Create Circular"
Filling up 'heap' with the array. A Function to check if heap is empty. Function to get index parent of i. Function to get index of k th child of i. Function to find least element. Function
This C++ program implements the "Disjoint" Set data structure. It is a data structure that keeps track of a set of elements partitioned into a number of disjoint ("nonoverlapping")
Inserting element into the "deque". Deleting element from the deque. "Insert" element in "doubly ended queue". Enter the value to be inserted. Element inserted into empty deque.
Creating double link list. and Insertion at the beginning. Insertion of element at particular position. "Deletion" of element from the List. 'Display' elements of doubly link list. Reverse
Link nodes in fibonnaci heap. Union nodes in fibonnaci heap. Extract min node in fibonnaci heap. Consolidate node in fibonnaci heap and Decrease key of nodes in fibonnaci heap. Find
Adding element to a node and check if node contains element. 'Adding string' in the table. Check if table contains string. Enter String to be inserted. Display table chained with binary
Genereate first "Hash" and genereate second hash. Initialize table and "Find" element from the table. Function to insert element into the table. Function to rehash the table. Retrieve
Insert Element at a key. Search Element at a key. Remove Element at a key. Enter element to be inserted. Enter key at which element to be inserted. And Enter key of the element to
Returns whether n is "prime" or not. Find next prime size of the table. Function To Generate Hash. Function to Initialize Table. Function to "Find Element" at a key. Insert Element into a
Page 1 Page 2 Page 3