Java Programs on Data Structures
- Java Program to Implement Doubly LinkedList
- Java Program to Implement Circular LinkedList
- Java Program to Implement Binary Search Tree
- Java Program to Implement AVL Tree
- Java Program to Implement Red-Black Tree
- Java Program to Implement HashTable
- Java Program to Implement Graph Using Adjacency Matrix
- Java Program to Implement Graph Using Adjacency List
- Java Program to Perform Breadth-First Search in a Graph
- Java Program to Perform Depth-First Search in a Graph
- Java Program to Find Shortest Path in a Graph (Dijkstra’s Algorithm)
- Java Program to Find Minimum Spanning Tree (Kruskal’s Algorithm)
- Java Program to Implement Trie Data Structure
- Java Program to Implement a Priority Queue Using Heap
- Java Program to Implement Stack Using Array
- Java Program to Implement Stack Using LinkedList
- Java Program to Implement Queue Using LinkedList
- Java Program to Implement Deque Using LinkedList
- Java Program to Implement a Circular Buffer
- Java Program to Implement Union-Find Data Structure
- Java Program to Implement Segment Tree
- Java Program to Implement a Suffix Array
- Java Program to Implement a Suffix Tree
- Java Program to Implement a B-Tree
- Java Program to Implement a B+ Tree
- Java Program to Implement a Hash Map from Scratch
- Java Program to Implement LRU Cache Using Array
- Java Program to Implement LRU Cache Using LinkedList
- Java Program to Implement a Quadtree
- Java Program to Implement a KD-Tree
- Java Program to Implement an R-Tree
Java Solutions for Data Structures and Algorithms Problems (Interview Q&A)
- Java: Finding a Pair in an Array With a Given Sum
- Java: Longest Common Subsequence (LCS)
- Java: Level Order Traversal (or BFS) of a Binary Tree
- Java: Insertion in a Binary Search Tree (BST)
- Java Tree Traversals – Inorder, Preorder, and Postorder
- Java Solution for 0/1 Knapsack Problem
- Java Solution for Longest Increasing Subsequence (LIS) Problem
- Java Solution for Subset Sum Problem
- Java Solution for Longest Palindromic Subsequence
- Java: Print All Subarrays with 0 Sum
- Java Solution for Longest Common Substring Problem
- Java: Find the Shortest Path in a Maze
- Java: Find Subarrays with a Given Sum in an Array
- Java: Check if Two Binary Trees Are Identical or Not
- Java Solution for Rod Cutting Problem
- Java: Find the First or Last Occurrence of a Given Number in a Sorted Array
- Java Solution for Word Break Problem
- Java: Find All Possible Palindromic Substrings of a String
- Java Solution for The Levenshtein Distance (Edit Distance) Problem
- Java: Inversion Count of an Array
- Java Solution for Chess Knight Problem
- Java Solution for Partition Problem
- Find the Largest Number Possible From a Given Set of Numbers
- Find k’th Smallest Element in an Array in Java
- Java: Determine whether a Given Binary Tree is a BST or Not
- Java Solution for Minimum Sum Partition Problem
- Sort Binary Array in Linear Time in Java
- Java Solution for Snake and Ladder Problem
- Merge Two Sorted Linked Lists Into One in Java
- Find the Duplicate Element in a Limited Range Array in Java
- Java Solution for Finding k’th Largest Element in an Array
- Java Solution for Finding Maximum Length Subarray Having a Given Sum
- Sorting an Array of 0’s, 1’s, and 2’s (Dutch National Flag Problem) in Java
- Find the Missing Number in an Array without Using Any Extra Space in Java
- Find Maximum Length Subarray Having an Equal Number of 0’s and 1’s in Java
- Find the Diameter of a Binary Tree in Java
- Find the Maximum Product of Two Integers in an Array in Java
- Move All Zeros Present in an Array to the End in Java
- Search a Key in the Binary Search Tree (BST) in Java
- Print Matrix in Spiral Order in Java
- Rearrange Linked List in Increasing Order in Java
- Check if a Linked List Is Palindrome or Not in Java
- Count Occurrences of a Number in a Sorted Array with Duplicates in Java
- Reverse a Doubly Linked List in java
- Reverse a Linked List in java
- Rotate a Linked List in Java
- Delete Last Occurrence of an Item From Linked List in Java
- Delete Middle of Linked List in Java
- Remove Duplicate Elements From Sorted Linked List in Java
- Detect Loop in Linked List in Java
- Circular Linked List Traversal in Java
- Deletion From a Circular Linked List in Java
- Delete without Head Pointer in Java
- Implement a Stack Using Singly Linked List in Java
- Remove Every k-th Node of the Linked List in Java
- Pairwise Swap of a Linked List in Java
- Count the Occurrence of an Integer in a Linked List in Java
- Deletion in Linked List in Java
- Convert Singly Linked List Into Circular Linked List in Java
- Reverse a String Using Stack in Java
- Reverse an Array Using Stack in Java
- Delete Middle Element From Stack in Java
Java Programs on Algorithms
- Java Program to Implement Bubble Sort Algorithm
- Java Program to Implement Selection Sort Algorithm
- Java Program to Implement Insertion Sort Algorithm
- Java Program to Implement Merge Sort Algorithm
- Java Program to Implement Quick Sort Algorithm
- Java Program to Implement Heap Sort Algorithm
- Java Program to Implement Radix Sort Algorithm
- Java Program to Implement Bucket Sort Algorithm
- Java Program to Implement Shell Sort Algorithm
- Java Program to Implement Topological Sort Algorithm
- Java Program to Implement Binary Search Algorithm
- Java Program to Implement Linear Search Algorithm
- Java Program to Implement Breadth-First Search Algorithm
- Java Program to Implement Depth-First Search Algorithm
- Java Program to Implement Floyd-Warshall Algorithm
- Java Program to Implement Prim’s Algorithm
- Java Program to Implement Kruskal’s Algorithm
- Java Program to Implement Bellman-Ford Algorithm
- Java Program to Implement Greedy Algorithm for Knapsack Problem
- Java Program to Implement Longest Increasing Subsequence Algorithm
- Java Program to Implement Strassen’s Matrix Multiplication Algorithm
- Java Program to Implement KMP Pattern Matching Algorithm
- Java Program to Implement Z-Algorithm for Pattern Matching
- Java Program to Implement Dijkstra’s Shortest Path Algorithm
- Java Program to Implement Johnson’s Algorithm
- Java Program to Implement Ford-Fulkerson Algorithm