Welcome to Simple DSA, a beginner-friendly collection of Data Structures and Algorithms problems!
This repository is perfect for first-time contributors and anyone looking to practice basic programming concepts while participating in Hacktoberfest 2025.
Solve the challenges below in any programming language and submit a pull request (PR) to contribute. Your contributions will help others learn and build confidence in DSA concepts.
You are free to contribute solutions in any language you are comfortable with (C, C++, Java, Python, etc.).
- "Hello, World!" Program 🌍
- Program to Print an Integer (Entered by the User)
- Program to Add Two Integers
- Program to Multiply two Floating Point Numbers
- Program to Find ASCII Value of a Character
- Program to Compute Quotient and Remainder
- Program to Find the Size of int, float, double and char
- Program to Demonstrate the Working of Keyword
long - Program to Swap Two Numbers
- Program to Check Whether a Number is Even or Odd
- Program to Check Whether a Character is Vowel or Consonant
- Program to Find the Largest Number Among Three Numbers
- Program to Find all Roots of a Quadratic Equation
- Program to Check Leap Year
- Program to Check Whether a Number is Positive or Negative
- Program to Check Whether a Character is an Alphabet or not
- Program to Calculate the Sum of Natural Numbers
- Program to Find Factorial of a Number
- Program to Generate Multiplication Table
- Program to Display Fibonacci Sequence
- Program to Find GCD of two Numbers
- Program to Find LCM of two Numbers
- Program to Display Characters from A to Z Using Loop
- Program to Count Number of Digits in an Integer
- Program to Reverse a Number
- Program to Calculate the Power of a Number
- Program to Check Whether a Number is Palindrome or Not
- Program to Check Whether a Number is Prime or Not
- Program to Check Armstrong Number
- Program to Display Factors of a Number
- Program to Make a Simple Calculator Using
switch...case - Program to Display Prime Numbers Between Intervals Using Function
- Program to Check Prime or Armstrong Number Using User-defined Function
- Program to Check Whether a Number can be Expressed as Sum of Two Prime Numbers
- Program to Find the Sum of Natural Numbers using Recursion
- Program to Find Factorial of a Number Using Recursion
- Program to Find G.C.D Using Recursion
- Program to Convert Binary Number to Decimal and vice-versa
- Program to Convert Octal Number to Decimal and vice-versa
- Program to Convert Binary Number to Octal and vice-versa
- Program to Reverse a Sentence Using Recursion
- Program to Calculate the Power Using Recursion
- Program to Calculate Average Using Arrays
- Program to Find Largest Element in an Array
- Program to Calculate Standard Deviation
- Program to Add Two Matrices Using Multi-dimensional Arrays
- Program to Multiply Two Matrices Using Multi-dimensional Arrays
- Program to Find Transpose of a Matrix
- Program to Multiply Two Matrices by Passing Matrix to a Function
- Program to Access Array Elements Using Pointer
- Program to Swap Numbers in Cyclic Order Using Call by Reference
- Program to Find Largest Number Using Dynamic Memory Allocation
- Program to Find the Frequency of Characters in a String
- Program to Count the Number of Vowels, Consonants and so on
- Program to Remove all Characters in a String Except Alphabets
- Program to Find the Length of a String
- Program to Concatenate Two Strings
- Program to Copy String Without Using
strcpy() - Program to Sort Elements in Lexicographical Order (Dictionary Order)
- Program to Store Information of a Student Using Structure
- Program to Add Two Distances (in inch-feet) System Using Structures
- Program to Add Two Complex Numbers by Passing Structure to a Function
- Program to find Container with most water (LeetCode 11)
-
Merge Strings Alternately: You are given two strings
word1andword2. Merge the strings by adding letters in alternating order, starting withword1. If a string is longer than the other, append the additional letters onto the end of the merged string. (LeetCode 1768) -
Find the Number Closest to Zero: Given an integer array
numsof size$n$ , return the number with the value closest to 0 innums. If there are multiple answers (e.g., -5 and 5), return the smallest one (e.g., -5).
To participate in Hacktoberfest and contribute to this repository, please follow these steps carefully:
- Register for Hacktoberfest on the official website.
- Star this repository ⭐ – Click the "Star" button at the top-right corner. This is required for your PRs to count towards Hacktoberfest.
- Ensure you have a GitHub account and basic knowledge of Git.
- Set up your local development environment (install Git, a code editor like VS Code, and the necessary programming language for your solution).
- Fork this repository by clicking the "Fork" button in the top right corner.
- Clone your forked repository to your local machine:
git clone [https://github.com/YOUR_USERNAME/Simple-DSA.git](https://github.com/YOUR_USERNAME/Simple-DSA.git)
- Navigate into the project directory:
cd Simple-DSA - Create a new branch for your contributions. Use a descriptive name like
add-solution-q1-python:git checkout -b your-branch-name
- Make your changes:
- Create a folder for the language you are using (e.g.,
C++,Python,Java). - Inside the language folder, add your solution files. Name the file according to the question number, e.g.,
q1_hello_world.corq25_reverse_number.py. - NOTE: Make sure to add your profile details to
contributors.jsonin the root directory.
- Create a folder for the language you are using (e.g.,
- Commit your changes with a meaningful message:
git add . git commit -m "feat: Added solution for Q[Question Number] in [Language]"
- Push your branch to GitHub:
git push origin your-branch-name
- Create a Pull Request (PR): Once your branch is pushed, navigate to your forked repository on GitHub and click the "Compare & pull request" button to submit your changes to the original repository.
To ensure your Pull Request (PR) is valid and counts toward Hacktoberfest 2025:
-
✅ Follow Hacktoberfest Guidelines
Make sure your PR complies with Hacktoberfest rules. -
✅ One PR per Issue
Multiple PRs addressing the same issue will not be accepted. Focus on a single solution per PR. -
✅ Meaningful Contributions Only
Avoid minor typo fixes or formatting changes that do not provide a functional solution. Each PR should add real value. -
✅ Solve at Least One Question
Your PR must provide a solution to at least one of the listed DSA problems. -
✅ Follow Repository Guidelines
Ensure your code follows the folder structure, naming conventions, and language-specific coding standards. -
✅ Test Your Code
All solutions should be tested and work as expected before submission.
You’ve successfully contributed to Simple DSA! 🚀
Thank you for helping make this repository a great resource for learning and practicing Data Structures & Algorithms.
By participating, you’re also making your Hacktoberfest 2025 contribution count! ✨🎉🎊
Keep coding, keep learning, and don’t forget to star this repository ⭐ if you haven’t already!