This repository contains a collection of logic-building problems implemented in Java. The goal of this project is to strengthen problem-solving skills, improve core programming logic, and prepare for coding interviews.
📌 Topics Covered
🔥 Section 1 — Number Logic
- Reverse Integer with Overflow Handling
- Armstrong Number (Dynamic Digits)
- Strong Number
⚡ Section 2 — Loops & Conditions
- Prime Numbers in Range (with count)
- GCD and LCM (without built-in functions)
- Perfect Number Check
🔁 Section 3 — Arrays (Logic Heavy)
- Move All Zeros to End
- Find Duplicate Element (without extra space)
- Leaders in Array
- Left Rotate Array by K Steps
- Subarray with Given Sum
🔤 Section 4 — Strings
- Longest Substring Without Repeating Characters
- String Compression
🔁 Section 5 — Patterns
- Hollow Pyramid Pattern
💣 Section 6 — Advanced Logic
- Frequency of Elements in Array (without HashMap)
🧠 Purpose of This Repository
- Improve core Java programming skills
- Build strong problem-solving mindset
- Understand logic instead of memorizing code
- Prepare for technical interviews and coding tests
🛠️ Technologies Used
- Java (Core Java)
- Basic Data Structures (Arrays, Strings)
- Algorithms (Searching, Sliding Window, Two Pointer, etc.)
-
Clone the repository:
git clone https://github.com/your-username/your-repo-name.git
-
Navigate to the folder:
cd your-repo-name -
Compile and run any Java file:
javac FileName.java java FileName
📈 Learning Outcome
By practicing these problems, you will:
- Gain confidence in solving DSA problems
- Improve coding speed and accuracy
- Understand real interview-level logic
🤝 Contribution
Feel free to:
- Add more problems
- Improve existing solutions
- Optimize logic
⭐ Support
If you found this useful, consider giving this repo a ⭐ on GitHub!