This document provides a comprehensive overview of the Simple DSA repository structure and organization.
Simple-DSA/
│
├── README.md # Main repository documentation
├── LICENSE # MIT License file
├── CODE_OF_CONDUCT.md # Community guidelines
├── CONTRIBUTING.md # Contribution guidelines
├── SECURITY.md # Security policy
├── REPOSITORY_STRUCTURE.md # This file - structure documentation
├── contributors.json # Contributors data (JSON format)
│
├── .github/ # GitHub specific files
│ ├── ISSUE_TEMPLATE/ # Issue templates
│ │ ├── bug_report.md # Template for bug reports
│ │ ├── feature_request.md # Template for feature requests
│ │ └── solution_submission.md # Template for solution submissions
│ │
│ ├── pull_request_template.md # PR template
│ │
│ └── workflows/ # GitHub Actions (optional)
│ └── greetings.yml # Welcome message for new contributors
│
├── C/ # C language solutions
│ ├── q1_hello_world.c
│ ├── q2_print_integer.c
│ ├── q3_add_two_integers.c
│ └── ...
│
├── C++/ # C++ language solutions
│ ├── q1_hello_world.cpp
│ ├── q2_print_integer.cpp
│ ├── q3_add_two_integers.cpp
│ └── ...
│
├── Java/ # Java language solutions
│ ├── Q1HelloWorld.java
│ ├── Q2PrintInteger.java
│ ├── Q3AddTwoIntegers.java
│ └── ...
│
├── Python/ # Python language solutions
│ ├── q1_hello_world.py
│ ├── q2_print_integer.py
│ ├── q3_add_two_integers.py
│ └── ...
│
├── javascript/ # JavaScript solutions
│ ├── q1_hello_world.js
│ ├── q2_print_integer.js
│ └── ...
│
├── DSA_problems/ # Additional DSA problem resources
│ └── ...
│
├── database question/ # Database-related questions
│ └── ...
│
├── .idea/ # IDE configuration files (gitignored)
├── .vscode/ # VS Code configuration files (gitignored)
│
└── [Other Languages]/ # Additional languages as contributed
└── ...
- All filenames should be descriptive and follow consistent patterns
- Use lowercase with underscores for separation (snake_case) except where language conventions differ
- Always prefix with question number:
q[NUMBER]_
Pattern: q[number]_descriptive_name.c or .cpp
Examples:
- q1_hello_world.c
- q15_leap_year.cpp
- q42_multiply_matrices.c
Pattern: q[number]_descriptive_name.py
Examples:
- q1_hello_world.py
- q15_leap_year.py
- q42_multiply_matrices.py
Pattern: Q[Number]DescriptiveName.java (PascalCase for class names)
Examples:
- Q1HelloWorld.java
- Q15LeapYear.java
- Q42MultiplyMatrices.java
Pattern: q[number]_descriptive_name.js
Note: The repository uses lowercase 'javascript' folder
Examples:
- q1_hello_world.js
- q15_leap_year.js
- q42_multiply_matrices.js
Follow the language's standard naming conventions while maintaining the q[number]_ prefix.
Each solution file should include a header comment with:
// Question [Number]: [Problem Title]
// Author: [Your Name/GitHub Username]
// Date: [Submission Date]
// Language: [Programming Language]
// Description: [Brief description of the problem]
// Time Complexity: [If applicable]
// Space Complexity: [If applicable]
C/C++:
/*
* Question 15: Check Leap Year
* Author: JohnDoe (@johndoe)
* Date: October 29, 2025
* Language: C
* Description: Program to check if a given year is a leap year
* Time Complexity: O(1)
* Space Complexity: O(1)
*/Python:
"""
Question 15: Check Leap Year
Author: JohnDoe (@johndoe)
Date: October 29, 2025
Language: Python
Description: Program to check if a given year is a leap year
Time Complexity: O(1)
Space Complexity: O(1)
"""Java:
/*
* Question 15: Check Leap Year
* Author: JohnDoe (@johndoe)
* Date: October 29, 2025
* Language: Java
* Description: Program to check if a given year is a leap year
* Time Complexity: O(1)
* Space Complexity: O(1)
*/Solutions are organized by programming language, but they correspond to categories in the README:
- Basic Programming (Q1-Q9): Fundamental programs
- Control Flow (Q10-Q16): Conditionals and decision making
- Loops & Functions (Q17-Q42): Iteration and recursion
- Arrays & Matrices (Q43-Q52): Array operations
- Strings & Structures (Q53-Q62): String manipulation and data structures
- Advanced (Q63+): LeetCode-style problems
The contributors.json file maintains a record of all contributors:
{
"contributors": [
{
"name": "Full Name",
"github": "username",
"contributions": [
"Q1 - Python",
"Q15 - C++"
],
"about": "Brief description",
"profile_url": "https://github.com/username"
}
],
"stats": {
"total_contributors": 1,
"total_solutions": 2,
"languages": ["Python", "C++"]
}
}To add support for a new programming language:
-
Create Language Directory
mkdir [LanguageName]/
Note: Check existing folder naming (e.g.,
javascriptis lowercase in this repo) -
Follow Naming Convention
- Check the repository's existing pattern
- Examples in this repo:
C/,C++/,Java/,Python/,javascript/ - Maintain consistency with existing folders
-
Add README (Optional)
- Create a
README.mdin the language folder - Include setup instructions
- List language-specific considerations
- Create a
-
Document in Main README
- Add the language to the supported languages list
- Update any relevant sections
| File | Purpose |
|---|---|
README.md |
Main repository documentation, problem list, contribution guide |
CODE_OF_CONDUCT.md |
Community behavior guidelines |
CONTRIBUTING.md |
Detailed contribution instructions |
LICENSE |
MIT License terms |
SECURITY.md |
Security policy and vulnerability reporting |
REPOSITORY_STRUCTURE.md |
This file - structure documentation |
CONTRIBUTORS.md |
Display-friendly contributors list |
contributors.json |
Contributor tracking and stats (JSON format) |
| Folder | Purpose |
|---|---|
DSA_problems/ |
Additional DSA problem resources and documentation |
database question/ |
Database-related problems and solutions |
.idea/ |
JetBrains IDE configuration (should be in .gitignore) |
.vscode/ |
VS Code configuration (should be in .gitignore) |
| File | Purpose |
|---|---|
ISSUE_TEMPLATE/bug_report.md |
Bug report template |
ISSUE_TEMPLATE/feature_request.md |
Feature request template |
ISSUE_TEMPLATE/solution_submission.md |
Solution submission issue template |
pull_request_template.md |
Pull request template |
workflows/ |
GitHub Actions workflows (optional) |
- One solution per file
- Group solutions by language
- Keep consistent naming across languages
- Include proper documentation in each file
- Add meaningful comments
- Use descriptive variable names
- Follow language-specific style guides
- Include complexity analysis when relevant
- Keep README.md updated
- Document any new features or changes
- Update contributors.json with each contribution
- Maintain consistency across all documentation
- Navigate to appropriate language folder:
cd [Language]/ - Create file with proper naming:
q[number]_name.ext - Add header comment with details
- Write solution with comments
- Update
contributors.json - Submit PR using the template
- Create directory:
mkdir [Language]/ - Check existing naming convention (e.g.,
javascript/is lowercase) - Add first solution following naming convention
- Update main README if needed
- Submit PR mentioning new language support
- Edit the relevant .md file
- Ensure consistency with other docs
- Preview changes locally
- Submit PR with clear description
If you have questions about the repository structure:
- Check existing issues for similar questions
- Refer to
CONTRIBUTING.mdfor contribution guidelines - Create a new issue using the appropriate template
- Contact maintainers through GitHub discussions
Last Updated: October 29, 2025
This structure guide is maintained by the Simple DSA community. Suggestions for improvements are always welcome!