Skip to content

A collection classic and modern algorithms implemented in Java, designed for clarity, performance, and learning

Notifications You must be signed in to change notification settings

Manzi-Elvis/Algorithms-in-JAVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

👋 Welcome to the Algorithms in Java Repository!

Hey there, fellow developer!
Whether you're just starting your Java journey or looking to strengthen your algorithmic problem-solving skills, you’re in the right place.

This repository is built for beginners and enthusiasts alike — to help you learn, practice, and master algorithms through clear explanations, well-commented Java code, and hands-on exercises.

Every algorithm here is designed to make learning fun, practical, and easy to understand, no matter your experience level.

“The best way to learn algorithms is not just to read them — it’s to build them, run them, and break them.”

So grab your keyboard, explore the code, and start sharpening your logic — one algorithm at a time!

Algorithms Included

1. Sorting Algorithms

  • Bubble Sort
  • Selection Sort
  • Insertion Sort
  • Merge Sort
  • Quick Sort
  • Heap Sort
  • Counting Sort

2. Search Algorithms

  • Linear Search
  • Binary Search
  • Jump Search
  • Interpolation Search

3. Hashing Algorithms

  • Hash Function Implementations
  • HashMap from Scratch
  • Collision Handling (Chaining & Open Addressing)

4. Dynamic Programming Algorithms

  • Fibonacci Sequence (Top-Down & Bottom-Up)
  • 0/1 Knapsack Problem
  • Longest Common Subsequence (LCS)
  • Coin Change Problem
  • Matrix Chain Multiplication

5. Graph Algorithms

  • Breadth-First Search (BFS)
  • Depth-First Search (DFS)
  • Dijkstra’s Shortest Path
  • Bellman-Ford Algorithm
  • Floyd-Warshall Algorithm
  • Topological Sorting

6. Greedy Algorithms

  • Kruskal’s Minimum Spanning Tree (MST)
  • Prim’s Minimum Spanning Tree
  • Huffman Coding
  • Activity Selection Problem

7. String Algorithms

  • Palindrome Checker
  • Anagram Checker
  • KMP Pattern Matching
  • Rabin-Karp Algorithm
  • Longest Common Prefix
  • String Reversal

How to Use

  1. Clone the repository
    git clone ...
    cd ...
    
  2. Compile and run any algorithm
  3. Explore, learn, and modify the algorithms as you go!

Contributing

Contributions are welcome! To add or improve an algorithm:

  1. Fork this repo

  2. Create a new branch (feature/your-feature-name)

  3. Add your algorithm with a short explanation and complexity

  4. Submit a pull request

Guidelines:

  • Follow consistent Java naming conventions
  • Comment your logic clearly
  • Include time and space complexity

Support:

If you find this project helpful, please ⭐ star the repo!

About

A collection classic and modern algorithms implemented in Java, designed for clarity, performance, and learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages