A data structure in Java is a method of organizing and storing data so that it can be used more efficiently. There are two types of data structures: primitive data structures and non-primitive data structures. The term “primitive data structure” refers to a data structure that only stores one type of data. Non-primitive data structures are more complex data structures and are derived from primitive data structures. Non-primitive data structures are divided into two categories: Linear Data Structures and Non-linear Data Structures.

The most common operations that can be performed on data structures include searching, sorting, inserting, updating, and deletion. This section covers data structure topics such as arrays, linked lists, singly and doubly linked lists, stacks, queues, binary trees, binary search trees, heap, hashing, and, graphs. These Java examples cover a wide range of programming areas in Computer Science. These Java programs are often asked for in the interview. Every example program includes program description, Java code, and program output. All examples have been compiled and tested on Windows and Linux systems.

### Here is the listing of Data Structure Topics:

## Java Programs on Linked List

- Java Program to Add Two Numbers using Linked List
- Java Program to Subtract Two Numbers using Linked Lists
- Java Program to Implement Adjacency List
- Java Program to Implement Skip List
- Java Program to Implement Self Organising List
- Java Program to Implement Unrolled Linked List
- Java Program to Implement Vlist
- Java Program to Implement Triply Linked List
- Java Program to Implement Sorted List
- Java Program to Implement Stack using Linked List
- Java Program to Implement Queue using Linked List
- Java Program to Implement Binary Search Tree using Linked Lists

## Java Programs on Stack

- Java Program to Implement Stack
- Java Program to Implement Stack using Two Queues
- Java Program to Check for Balanced Parenthesis by using Stacks
- Java Program to Convert a Decimal to Binary Number using Stacks
- Java Program to Evaluate an Expression using Stacks
- Java Program to Solve Tower of Hanoi using Stacks

## Java Programs on Tree

- Java Program to Implement Ternary Search Tree
- Java Program to Implement Fenwick Tree
- Java Program to Implement Disjoint Set Data Structure
- Java Program to Implement Binomial Tree
- Java Program to Implement Suffix Tree
- Java Program to Implement Range Tree
- Java Program to Print the Nodes at Odd Levels of a Tree

## Java Programs on Binary Tree

## Java Programs on Binary Search Tree

## Java Programs on Heap

- Java Program to Implement Heap
- Java Program to Implement Binary Heap
- Java Program to Implement Binomial Heap
- Java Program to Implement Fibonacci Heap
- Java Program to Implement D-ary Heap
- Java Program to Implement Ternary Heap
- Java Program to Implement Meldable Heap
- Java Program to Implement Pairing Heap
- Java Program to Implement Leftist Heap
- Java Program to Implement Skew Heap
- Java Program to Implement Min Heap
- Java Program to Implement Max Heap
- Java Program to Implement Heap Sort using a Priority Queue

## Data Structure Programs in Java on Hashing

- Java Program to Implement Hash Tables
- Java Program to Implement Hash Tables with Double Hashing
- Java Program to Implement Hash Tables Chaining with Singly Linked Lists
- 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 Chaining with Binary Trees
- Java Program to Implement Hash Tables with Linear Probing
- Java Program to Implement Hash Tables with Quadratic Probing
- Java Program to Implement Hash Tree
- Java Program to Implement Hash Trie
- Java Program to Implement Min Hash
- Java Program to Implement Rolling Hash
- Java Program to Implement Bloom Filter
- Java Program to Implement CountMinSketch
- Java Program to Implement Direct Addressing Tables

## Java Programs on Set, Vector & Trie

- Java Program to Implement Bit Set
- Java Program to Implement Tree Set
- Java Program to Implement Bit Matrix
- Java Program to Implement Vector
- Java Program to Implement Sorted Vector
- Java Program to Implement Sparse Vector
- Java Program to Implement Trie
- Java Program to Implement Patricia Trie
- Java Program to Implement Bi-Directional Map
- Java Program to Implement Control Table

## Java Programs on Graph

- Java Program to Find Transpose of a Graph Matrix
- Java Program to Find Strongly Connected Components in Graphs
- Java Program to Detect Cycle in a Graph using Graph Traversal
- Graph Representation using Adjacency Matrix in Java
- Graph Representation using Incidence Matrix in Java
- Graph Representation using Adjacency List in Java
- Graph Representation using Incidence List in Java
- Graph Representation using 2D Arrays in Java
- Graph Representation using Linked List in Java
- Java Program to Implement Graph Structured Stack
- Java Program to Find All Forward Edges in a Graph
- Java Program to Find All Cross Edges in a Graph
- Java Program to Find All Back Edges in a Graph