Java Programming Examples on Data-Structures

This section covers Java Programming Examples on Datastructure. Every example program includes the description of the program, Java code as well as output of the program. Here is the listing of Java programming examples:

1. Java Programming examples on “Hashing”

Hashing is a way to assign a unique code for any variable/object after applying any function/algorithm on its properties. Hash table is a data structure which stores data in an array format & each data value has its own unique index value. Hash tree (or hash trie) is a persistent data structure that can be used to implement sets and maps, intended to replace hash tables in purely functional programming. MinHash is a technique for quickly estimating how similar two sets are. Rolling hash technique search is also known as Rabin-Karp algorithm. The following programs demonstrate the implementation of hash tables chaining with binary trees, list heads, linear probing, singly and doubly linked lists. It also explains the implementation of hash trie and rolling hash.

Java Program to Implement Hash Tables
Java Program to Implement Hash Tables chaining with Singly Linked Lists
Java Program to Implement Hash Tables Chaining with Binary Trees
Java Program to Implement Hash Tables Chaining with Doubly Linked Lists
Java Program to Implement Hash Tables Chaining with List Heads
Java Program to Implement Hash Tables with Linear Probing
Java Program to Implement Hash Tables with Quadratic Probing
Java Program to Implement Hash Tables with Double Hashing
Java Program to Implement Hash Trie
Java Program to Implement Hash List
Java Program to Implement Hash Tree
Java Program to Implement prefix Hash Tree
Java Program to Implement Rolling Hash
Java Program to Implement Min Hash
Java Program to Implement Distributed Hash table

2. Java Programming examples on “Heaps”

The following section demonstrates the implementation of Heaps, Binary Heap, Fibonacci Heap, Pairing Heap, Min Heap, Pairing & Ternary Heaps. A heap is a specialized tree-based data structure that satisfies the heap properties. A binomial heap is a heap similar to a binary heap but also supports quick merging of two heaps. This is achieved by using a special tree structure. Fibonacci heap is a heap data structure consisting of a collection of trees. It has a better amortized running time than a binomial heap. Pairing heap is a type of heap data structure with relatively simple implementation and excellent practical amortized performance. Ternary Heap is implemented using concept of D-ary Heap. A randomized meldable heap is a priority queue based data structure in which the underlying structure is also a heap-ordered binary tree. Skew heap is a heap data structure implemented as a binary tree. Heaps are crucial in several efficient graph algorithms such as Dijkstra’s algorithm and in the sorting algorithm heapsort.

advertisement
Java Program to Implement Heap
Java Program to Implement Binary Heap
Java Program to Implement Weak Heap
Java Program to Implement Binomial Tree
Java Program to Implement Binomial Heap
Java Program to Implement Fibonacci Heap
Java Program to Implement LeftList Heap
Java Program to Implement Skew Heap
Java Program to Implement Ternary Heap
Java Program to Implement D-ary-Heap
Java Program to Implement Meldable Heap
Java Program to Implement Pairing Heap
Java Program to Implement Min Heap
Java Program to Implement Max Heap

3. Java Programming examples on “Array, Vector, Stack, Queue and Linked List”

The following section contains programs which deal with Array, Vector, Stack, Queue and Linked Lists. Array is an object which contains elements of similar data type. It is a data structure where we store similar elements. Sorted array is an array data structure in which each element is sorted in numerical, alphabetical, or some other order, and placed at equally spaced addresses in computer memory. Vectors are commonly used instead of arrays, because they expand automatically when new data is added. It can hold only Objects and not primitive types. Stack is an abstract data type or collection where Push – the addition of data elements to the collection and Pop – removal of data elements from the collection. Queue is a collection of objects on which operations can only be performed at two ends of the queue. They are head and tail. Linked list is a data structure consisting of a group of nodes which together represent a sequences.

Java Program to Implement Suffix Array
Java Program to Implement Sorted Array
Java Program to Implement Sparse Array
Java Program to Implement Sparse Matrix
Java Program to Implement Variable length array
Java Program to Implement vector
Java Program to Implement Bit Array
Java Program to Implement Control Table
Java Program to Implement Adjacency List
Java Program to Implement Adjacency Matrix
Java Program to Implement Graph Structured Stack
Java Program to Implement Disjoint Set Data Structure
Java Program to Implement Unrolled Linked List
Java Program to Implement VList
Java Program to Implement Xor Linked List
Java Program to Implement Difference List
Java Program to Implement Skip List
Java Program to Implement Stack
Java Program to Implement Queue
Java Program to Implement Dequeue
Java Program to Implement Pagoda
Java Program to Implement Direct Addressing Tables
Java Program to Implement Stack Using Two Queues
Java Program to Implement Queue Using Two Stacks
Java Program to Solve Tower of Hanoi Problem using Stacks
Java Program to Convert a Decimal Number to Binary Number using Stacks
Java Program to Check for balanced parenthesis by using Stacks
Java Program to Evaluate an Expression using Stacks
Java Program to Implement Singly Linked List
Java Program to Implement Doubly Linked List
Java Program to Implement Circular Singly Linked List
Java Program to Implement Circular Doubly Linked List
Java Program to Implement Queue using Linked List
Java Program to Implement Stack using Linked List
Java Program to Implement Sorted Singly Linked List
Java Program to Implement Sorted Doubly Linked List
Java Program to Implement Sorted Circularly Singly Linked List
Java Program to Implement Sorted Circular Doubly Linked List
Java Program to add two large numbers using Linked List
Java Program to subtract two large numbers using Linked Lists
Java Program to Implement Triply Linked List
Java Program to Implement Self organizing List
Java Program to implement Dynamic Array
Java Program to implement Associate Array
Java Program to Implement Sorted List
Java Program to Implement Sorted Vector
Java Program to implement Sparse Vector
Java Program to implement Array Deque

4. Java Programming examples on “Others”

The following section contains programs on Segment Tree is a tree data structure for storing intervals, or segments. It allows querying which of the stored segments contain a given point. Priority queue is an abstract data type which is like a regular queue or stack data structure, but additionally each element has a priority associated with it. BitSet is a class defined in the java.util package. It creates an array of bits represented by boolean values. Bi Directional Mapis a map that preserves the uniqueness of its values as well as that of its keys. This section also explains various other implementation on Bloom filters, CountMinSketch and Tree Set.

Java Program to Implement Segment Tree
Java Program to Implement Bloom Filter
Java Program to Implement CountMinSketch
Java Program to implement Bi Directional Map
Java Program to implement Circular Buffer
Java Program to implement Bit Set
Java Program to implement Bit Matrix
Java Program to implement Priority Queue
Java Program to Implement Patricia Trie
Java program to Implement Tree Set
If you want to learn implementations of all algorithms and programs in Java, Here’s the list of 1000 Java Algorithms, Problems & Programming Examples.

advertisement