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 Solve Approximate String Matching using Dynamic Programming
- Java Program to Find the Longest Increasing Subsequence
- 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 Parenthesize 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 Searching
Java Algorithms on Sorting
String Matching Algorithms in Java
Geometric Algorithms in Java
- Java Program to Find 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 if Point is inside Polygon
- Java Program to Implement Douglas-Peucker Algorithm
- Java Program to Show the Duality Transformation of Line and Point
Robust Geometric Primitives in Java
- Java Program to Find the Area of a Triangle using Determinants
- Java Program to Find the Volume of a Tetrahedron using Determinants
- Java Program to Find Area of a Polygon using Slicker Algorithm
- Java Program to use Above Below Primitive to Test Whether Two Lines Intersect
- Java Program to Check if Point is Inside or Outside a Circle
- Java Program to Find the Position of a Point with Respect to a Line using Above-Below-on Test
- Java Program to Check Whether a Given Points are Colinear or Not
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 Perform Arithmetic Operations without Data Type
- 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 Random Numbers in a Range
- 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 Linear Congruential Method for Generating Pseudo Random Number
- 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
- 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
- Java Program to Implement Sieve of Atkin to Generate Prime Numbers
- Java Program to Generate Prime Numbers Using 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
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 Possible Subsets using Gray Code Order
- Java Program to Generate All Possible Subsets using Lexicographic Order
- Java Program to Generate All Possible Subsets using Binary Counting Method
Java Algorithms on Graph
- Java Program to Check if Path Exists in a Graph
- Java Program to Check if Graph is DAG
- Java Program to Find the Longest Path in a Directed Acyclic Graph
- Java Program to Implement Stable Marriage Problem
- Java Program to Implement Hopcroft Algorithm
- Java Program to Implement Kosaraju Algorithm
- Java Program to Implement Tarjan Algorithm
- Java Program to Find the Minimum Cut of a Graph using Karger’s Algorithm
- Java Program to Find the Minimum Cut of a Graph using Karger’s Algorithm
- Java Program to Create a Random Graph using Random Edge Generation
- Java Program to Create a Random Graph using 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 whether Graph is Biconnected or Not
- Java Program to Find the Connected Components in an UnDirected Graph
- Java Program to Check if a Directed Graph is Weakly Connected or Not using DFS
- Java Program to Check if a Directed Graph is Strongly or Weakly Connected
- Java Program to Find the Minimum Edges to Build Strongly Connected DAG
- Java Program to Check Check Cut Vertices (Articulation Vertex) Exists in a Graph
- Java Program to Find the Minimum Number of Edges to Remove to Disconnect a Graph
- 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 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 the Shortest Path using Bellman Ford Algorithm
- Java Program to Find Shortest Path using Floyd-Warshall’s Algorithm
- Java Program to Find the Shortest Path using Dijkstra’s Algorithm
- Java Program to Find the Shortest Path from Source Vertex to All 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 the Transitive Closure of a Graph
- Java Program to Implement Warshall 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 Detect 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 Implement the Traditional Chinese Postman Problem