https://github.com/phrugsa-limbunlom/algoj
A collection of algorithms implemented in Java for practicing.
https://github.com/phrugsa-limbunlom/algoj
algorithm java
Last synced: 4 months ago
JSON representation
A collection of algorithms implemented in Java for practicing.
- Host: GitHub
- URL: https://github.com/phrugsa-limbunlom/algoj
- Owner: phrugsa-limbunlom
- License: mit
- Created: 2021-09-17T08:56:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-12T23:41:58.000Z (10 months ago)
- Last Synced: 2025-02-13T00:28:51.925Z (10 months ago)
- Topics: algorithm, java
- Language: Java
- Homepage:
- Size: 90.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Algorithms with Java
A collection of algorithms implemented in Java for practicing and learning.
## 📚 Overview
This repository contains various algorithm implementations in Java, covering topics such as:
- **Mathematical Computations** (e.g., Difference of Sum, GCD, Find Exponent)
- **String Manipulation** (e.g., Replace Character, Palindrome Check)
- **Array and Search Algorithms** (e.g., Trapping Water, Median Search)
- **Binary Tree Algorithms** (e.g., Depth and traversal operations)
## 🐂 Folder Structure
The project contains the following structure:
```plaintext
src/main/java/
├── binaryTree/
│ ├── BinaryTreeAlgorithms.java
├── DifferenceOfSumApp.java
├── DigitApp.java
├── FindExponentApp.java
├── GcdApp.java
├── LargeSmallSumApp.java
├── MedianSearchApp.java
├── NumberOfCarriesApp.java
├── PalindromeApp.java
├── ProductPairApp.java
├── ReplaceCharApp.java
├── SequenceApp.java
├── TrappingWaterApp.java
├── LICENSE
└── README.md
```
## 🚀 Getting Started
### Prerequisites
- Install [Java JDK](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)
- Install [Gradle](https://gradle.org/install/) (Optional for project management)
### Running an Algorithm
To compile and run a specific Java file, use:
```sh
javac .java # Compile the file
java # Run the compiled file
```
For example:
```sh
javac GcdApp.java
java GcdApp
```
## 📌 Algorithms List
| Algorithm | Description |
|-----------|------------|
| Difference of Sum | Calculates the difference between sum of squares and square of sum. |
| GCD | Finds the greatest common divisor of two numbers. |
| Find Exponent | Computes power of a number efficiently. |
| Palindrome | Checks if a string or number is a palindrome. |
| Median Search | Finds the median in a given list of numbers. |
| Trapping Water | Solves the trapping rain water problem. |
## 📝 License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## 🙌 Contributing
Contributions are welcome! Feel free to submit a pull request with any new algorithms or improvements.
## ⭐ Acknowledgments
If you found this repository useful, consider giving it a star ⭐ to support the project!
---
Happy Coding! 🚀