This repository contains a comprehensive collection of Java programs that cover the most essential Data Structures and Algorithms (DSA) problems — perfect for placements, coding interviews, and daily practice.
Covers foundational array problems like:
- Find the largest and smallest element
- Find the second largest element
- Check if an array is sorted
- Reverse an array (in-place)
- Find the missing number (1 to N)
- Remove duplicate elements
- Find all pairs with a given sum
- Left rotate the array by one position
- Count frequency of each element
- Merge two sorted arrays
Includes string manipulation challenges:
- Toggle case of characters
- Reverse a string
- Check if a string is palindrome
- Count vowels and consonants
- Remove all whitespaces
- Remove duplicate characters
- Find the first non-repeating character
- Check if two strings are anagrams
- Capitalize first letter of each word
- Count the frequency of characters
Practice logical pattern and number-based programs:
- Right-angled triangle of stars
- Inverted right-angled triangle
- Right-aligned triangle
- Pyramid pattern
- Number triangle
- Floyd’s triangle
- Multiplication table of a number
- Sum of first N natural numbers
- Reverse a number
- Print all even numbers up to N
Learn and master recursion through:
- Print numbers from 1 to N and N to 1
- Find factorial of a number
- Calculate sum of digits
- Reverse a string
- Check if a string or number is palindrome
- Generate Fibonacci sequence
- Calculate power of a number
- Find GCD using recursion
- Count digits in a number
- Find the Nth Fibonacci number
Essential programs often asked in interviews:
- Check if a number is prime
- Find factorial of a number
- Count prime numbers between two numbers
- Sum of digits in a number
- Find GCD of two numbers
- Check Armstrong number
- Reverse a number
- Generate Fibonacci series up to N terms
- Check odd or even
- Find the largest of three numbers
- ✅ Beginner-friendly structured problems
- ✅ Clean and readable Java code
- ✅ Organized folder-wise by topic
- ✅ Useful for placement and coding interview prep
- ✅ Ideal for practicing logic building and recursion
Would you like me to include GitHub badges (like “Language: Java”, “Contributions Welcome”, “Stars”) at the top to make it look even more professional for recruiters?
👨💻 Ganesh Moorthi M
B.E. Computer Science and Engineering | Einstein College of Engineering
💡 Passionate about problem-solving, web development, and mastering DSA concepts.
📫 Connect on GitHub: Ganeshmoorthii