Skip to content

Ganeshmoorthii/Must-Solve-DSA-Problems

Repository files navigation

🧠 Must-Solve DSA Problems

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.


📂 Folder Structure

1️⃣ Array-Basics-Problems

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

2️⃣ String-Basics-Problems

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

3️⃣ Pattern & Number Logic Problems

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

4️⃣ Recursion Problems

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

5️⃣ Most Commonly Asked Problems

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

🚀 Features

  • ✅ 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?

📘 Author

👨‍💻 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

About

No description, website, or topics provided.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages