Java is a popular object-oriented programming language for developing software for a wide range of platforms. This section contains the list of topics on Java Algorithms, Problems, and their Solution. These Java Algorithms cover a wide range of programs on string matching, graph, random algorithms, graph search, topological sorting, shortest path, hard graph, tree, convex hull, combinatorial algorithms, randomized algorithms, subset, partition problem, geometric and mathematical algorithms.

This section also covers various Java algorithms and implementations of dynamic programming, greedy algorithms, backtracking, searching, and sorting algorithms. 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 Java Algorithm Topics:

### Java Algorithms:

- Java Greedy Algorithms
- Java Algorithms on Dynamic Programming
- Java Algorithms on Backtracking
- Java Algorithms on Searching
- Java Algorithms on Sorting
- String Matching Algorithms in Java
- Java Algorithms on Cryptography
- Java Algorithms on Tree
- Java Algorithms on Misc

### Geometric Algorithms in Java:

- Geometric Algorithms in Java
- Robust Geometric Primitives in Java
- Nearest Neighbor Search in Java
- Java Algorithms on Convex Hull

### Mathematical Algorithms in Java:

### Combinatorial Problems in Java:

- Combinatorial Problems in Java
- Permutations & Combinations in Java
- Java Algorithms on Subset
- Partition Problems in Java

### Graph Algorithms in Java:

- Java Algorithms on Graph
- Java Algorithms on Graph Search
- Java Algorithms on Graph Connectivity
- Java Algorithms on Shortest Path
- Java Algorithms on Graph MST
- Java Algorithms on Topological Sorting
- Java Algorithms on Maximum Flow
- Java Algorithms on Bipartite Graph
- Java Algorithms on Euler Circuit
- Java Algorithms on Hard Graph
- Traveling Salesman Problem in Java
- Java Algorithms on Hamiltonian Cycle

### Java Programs:

## Java Algorithms on Dynamic Programming

- Java Program to Emulate N Dice Roller
- Java Program to Solve the 0-1 Knapsack Problem
- Java Program to Solve Knapsack Problem Using Dynamic Programming
- Java Program to Implement Kadane’s Algorithm
- Java Program to Implement Approximate String Matching using Dynamic Programming
- Java Program to Find the Longest Increasing Subsequence of a Given Sequence
- Java Program to Implement Longest Common Subsequence Algorithm
- Java Program to Find the Longest Subsequence Common to All Sequences in a Set of Sequences
- Java Program to Perform Optimal Parenthesization Using Dynamic Programming
- Java Program to Find All Pairs Shortest Path
- Java Program to Implement Maximum Length Chain of Pairs
- Java Program to Implement Word Wrap Problem

## Java Algorithms on Backtracking

- Java Program to Implement Knight’s Tour Problem
- Java Program to Solve Set Cover Problem assuming at max 2 Elements in a Subset
- Java Program to Implement Graph Coloring Algorithm
- Java Program to Implement Hamiltonian Cycle Algorithm
- Java Program to Implement Branch and Bound Method to Perform a Combinatorial Search

## Java Algorithms on Searching

## Java Algorithms on Sorting

## String Matching Algorithms in Java

## Java Algorithms on Cryptography

- Java Program to Implement Caesar Cipher
- Java Program to Implement Affine Cipher
- Java Program to Decode a Message Encoded Using Playfair Cipher
- Java Program to Implement the One Time Pad Algorithm
- Java Program to Implement the MD5 Algorithm
- Java Program to Perform Cryptography Using Transposition Technique

## Java Algorithms on Misc

- Java Program to Implement Gale Shapley Algorithm
- Java Program to Implement Flood Fill Algorithm
- Java Program to Implement Floyd Cycle Algorithm
- Java Program to Implement Brent Cycle Algorithm
- Java Program to Implement K Way Merge Algorithm
- Java Program to Implement Regula Falsi Algorithm
- Java Program to Implement Repeated Squaring Algorithm
- Java Program to Implement Shunting Yard Algorithm
- Java Program to Implement Borwein Algorithm

## Geometric Algorithms in Java

- Java Program to Compute Cross Product of Two Vectors
- Java Program to Implement Shoelace Algorithm
- Java Program to Implement Bresenham Line Algorithm
- Java Program to Implement Lloyd’s Algorithm
- Java Program to Implement First Fit Decreasing for 1-D Objects and M Bins
- Java Program to Check Whether a Given Point is in a Given Polygon
- Java Program for Douglas-Peucker Algorithm Implementation
- Java Program to Show the Duality Transformation of Line and Point

## Robust Geometric Primitives in Java

- Java Program to Compute the Area of a Triangle Using Determinants
- Java Program to Compute the Volume of a Tetrahedron Using Determinants
- Java Program to Implement Slicker Algorithm that avoids Triangulation
- Java Program to Use Above Below Primitive to Test Whether Two Lines Intersect
- Java Program to Check if a Point lies Inside or Outside a Circle Defined by Points in a Plane
- Java Program to Find the Position of a Point by Applying Above-Below-on Test
- Java Program to Check if a Given Set of Three Points Lie on a Single Line or Not

## Java Algorithms on Convex Hull

- Java Program to Implement Graham Scan Algorithm to Find the Convex Hull
- Java Program to Implement Jarvis March to Find the Convex Hull
- Java Program to Implement Gift Wrapping Algorithm in Two Dimensions
- Java Program to Implement Quick Hull Algorithm to Find Convex Hull
- Java Program to Perform Polygon Containment Test

## Numerical Algorithms in Java

- Java Program to Perform Complex Number Multiplication
- Java Program to Implement the Schonhage-Strassen Algorithm for Multiplication
- Java Program to Optimize Wire Length in Electrical Circuit
- Java Program to Perform the Unique Factorization of a Given Number
- Java Program to Implement Booth’s Multiplication Algorithm for Multiplication
- Java Program to Implement the Schonhage-Strassen Algorithm
- Java Program to Perform Arithmetic Operations on Numbers
- Java Program to Perform Partition of an Integer in All Possible Ways
- Java Program to Implement the Bin Packing Algorithm
- Java Program to implement Longest Arithmetic Progression Algorithm
- Java Program to Implement Extended Euclidean Algorithm
- Java Program to Implement Pollard Rho Algorithm
- Java Program to Implement Stein GCD Algorithm
- Java Program to Implement Fermat Factorization Algorithm
- Java Program to Implement Karatsuba Multiplication Algorithm
- Java Program to Implement Horner Algorithm
- Java Program to Implement Nth Root Algorithm
- Java Program to Implement Borwein Algorithm
- Java Program to Implement Cubic convergence 1/pi Algorithm
- Java Program to Implement Regula Falsi Algorithm
- Java Program to Implement Repeated Squaring Algorithm
- Java Program to Implement Shunting Yard Algorithm

## Linear Equations in Java

- Java Program to Solve any Linear Equations
- Java Program to Solve any Linear Equation in One Variable
- Java Program to Implement Gauss Jordan Elimination
- Java Program to Implement Gauss Seidel Method
- Java Program to Implement Gaussian Elimination Algorithm
- Java Program to Implement Coppersmith Freivald’s Algorithm
- Java Program to Implement Strassen’s Algorithm

## Randomized Algorithms in Java

- Java Program to Generate Randomized Sequence of Given Range of Numbers
- Java Program to Use rand and srand Functions
- Java Program to Generate Date Between Given Range
- Java Program to Generate N Number of Passwords of Length M Each
- Java Program to Generate Random Hexadecimal Bytes
- Java Program to Implement the Linear Congruential Generator
- Java Program to Generate Random Numbers Using Middle Square Method
- Java Program to Generate Random Numbers Using Multiply with Carry Method
- Java Program to Implement Fisher-Yates Algorithm for Array Shuffling
- Java Program to Implement Park-Miller Random Number Generation Algorithm
- Java Program to Implement Naor-Reingold Pseudo Random Function

## Java Algorithms on Sieve & Primality Test

- Java Program to Implement wheel Sieve to Generate Prime Numbers Between Given Range
- Java Program to Implement Sieve of Atkin to Generate Prime Numbers Between Given Range
- Java Program to Generate Prime Numbers Between a Given Range Using the Sieve of Sundaram
- Java Program to Perform Fermat Primality Test
- Java Program to Implement Miller Rabin Primality Test
- Java Program to Implement Solovay-Strassen Primality Test

## Permutations & Combinations in Java

- Java Program to Generate All Possible Combinations of a Given List of Numbers
- Java Program to Generate a Sequence of N Characters for a Given Specific Case
- Java Program to Implement Heap’s Algorithm for Permutation of N Numbers
- Java Program to Implement the Alexander Bogomolny’s UnOrdered Permutation Algorithm

## Java Algorithms on Subset

- Java Program to Generate a Random Subset by Coin Flipping
- Java Program to Generate All Possible Combinations Out of a,b,c,d,e
- Java Program to Generate All Possible Subsets with Exactly k Elements in Each Subset
- Java Program to Generate All Pairs of Subsets Whose Union Make the Set
- Java Program to Generate All Subsets of a Given Set in the Gray Code Order
- Java Program to Generate All Subsets of a Given Set in the Lexicographic Order
- Java Program to Implement the Binary Counting Method to Generate Subsets of a Set

## Partition Problems in Java

- Java Program to Perform Integer Partition for a Specific Case
- Java Program to Generate Random Partition out of a Given Set of Numbers or Characters
- Java Program to Find the Number of Ways and Count of all Possible Partitions
- Java Program to Find kth Smallest Element by the Method of Partitioning the Array

## Java Algorithms on Graph

- Java Program to Find Path Between Two Nodes in a Graph
- Java Program to Check Whether Graph is DAG
- Java Program to Find the Longest Path in a DAG
- Java Program to Solve a Matching Problem for a Given Specific Case
- Java Program to Implement Hopcroft Algorithm
- Java Program to Implement Kosaraju Algorithm
- Java Program to Implement Tarjan Algorithm
- Java Program to Implement an Algorithm to Find the Global min Cut in a Graph
- Java Program to Generate a Random UnDirected Graph for a Given Number of Edges
- Java Program to Create a Random Graph Using Random Edge Generation
- Java Program to Construct a Random Graph by the Method of Random Edge Selection
- Java Program to Generate a Graph for a Given Fixed Degree Sequence
- Java Program to Check if any Graph is Possible to be Constructed for a Given Degree Sequence

## Java Algorithms on Graph Connectivity

- Java Program to Traverse a Graph using BFS
- Java Program to Traverse a Graph using DFS
- Java Program to Check the Connectivity of Graph Using BFS
- Java Program to Check the Connectivity of Graph Using DFS
- Java Program to Check the Connectivity of Directed Graph Using BFS
- Java Program to Check the Connectivity of Directed Graph Using DFS
- Java Program to Check the Connectivity of Undirected Graph Using BFS
- Java Program to Check the Connectivity of Undirected Graph Using DFS
- Java Program to Check if a Directed Graph is a Tree or Not Using DFS
- Java Program to Check if an UnDirected Graph is a Tree or Not Using DFS
- Java Program to Check whether Graph is Biconnected
- Java Program to Check Whether a Graph is Strongly Connected or Not
- Java Program to Find the Connected Components of an UnDirected Graph
- Java Program to Test Using DFS Whether a Directed Graph is Weakly Connected or Not
- Java Program to Check Whether Weakly or Strongly Connected for a Directed Graph
- Java Program to Find Minimum Edges to Build Strongly Connected DAG
- Java Program to Check Whether Articulation Vertex Exists in a Graph
- Java Program to Find Minimum Number of Edges to Cut to make the Graph Disconnected
- Java Program to Find the Edge Connectivity of a Graph
- Java Program to Find the Vertex Connectivity of a Graph
- Java Program to Find Number of Articulation points in a Graph

## Java Algorithms on Shortest Path

- Java Program to Implement Dijkstra’s Algorithm Using Queue
- Java Program to Implement Dijkstra’s Algorithm Using Priority_queue
- Java Program to Implement Dijkstra’s Algorithm Using Set
- Java Program to Implement Bellmanford Algorithm
- Java Program to Implement Floyd Warshall Algorithm
- Java Program to Implement Johnson’s Algorithm
- Java Program to Implement Gabow Algorithm
- Java Program to Find Shortest Path using Bellman Ford Algorithm
- Java Program to Find Shortest Path using Floyd Warshall’s Algorithm
- Java Program to Find Shortest Path Using Dijkstra’s Algorithm
- Java Program to Find Shortest Path from Source Vertex to Other Vertices in Linear Time
- Java Program to Find All Pairs Shortest Path
- Java Program to Find Single Source Shortest Path in DAG
- Java Program to Find Transitive Closure of a Graph
- Java Program to Find Transitive Closure Using Warshall’s Algorithm

## Java Algorithms on Graph MST

- Java Program to Find Minimum Spanning Tree using Kruskal’s Algorithm
- Java Program to Find Minimum Spanning Tree using Prim’s Algorithm
- Java Program to Find Minimum Spanning Tree using Boruvka’s Algorithm
- Java Program to Find Number of Spanning Trees in a Complete Bipartite Graph
- Java Program to Implement the Edmond’s Algorithm for Maximum Cardinality Matching

## Java Algorithms on Topological Sorting

- Java Program for Topological Sorting in Graphs
- Java Program to Check Cycle in a Graph using Topological Sort
- Java Program to Check Whether Topological Sorting can be Performed in a Graph
- Java Program to Apply DFS to Perform the Topological Sorting of a Directed Acyclic Graph
- Java Program to Create a Random Linear Extension for a DAG
- Java Program to Remove the Edges in a Given Cyclic Graph

## Java Algorithms on Euler Circuit

- Java Program to Check Whether a Directed Graph Contains a Eulerian Cycle
- Java Program to Check Whether a Directed Graph Contains a Eulerian Path
- Java Program to Check Whether an Undirected Graph Contains a Eulerian Cycle
- Java Program to Check Whether an Undirected Graph Contains a Eulerian Path
- Java Program to Give an Implementation of the Traditional Chinese Postman Problem