Skip to content

theriyasharma24/DSA-Practice-Problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 

Repository files navigation

DSA Practice Problems

The aim of this repository is to contain optimized solutions solved in multiple programming languages for a large set of problems (450+) from Love Babbar's DSA list.

You can add your solutions or if you believe that your solution is more optimized than the existing one in the repository, feel free to open a Pull Request (PR) with your improved version.

Table of Contents

Overview

The problems are sourced from popular platforms like LeetCode, GeeksforGeeks, HackerRank, etc., and are sorted into categories such as:

  • Arrays
  • Matrix
  • String
  • Searching and Sorting
  • Linked Lists
  • Binary Trees
  • And more!

Each problem has:

  • A problem statement (problem_statement.md)
  • A solution in multiple languages (e.g., Python, Java, C++)
  • Optional test cases for validating the solution

Start Contributing

We encourage contributions from everyone! Here's how you can get involved:

  • Create an issue
  • Fork this repository
  • Clone it to your local machine
  • Choose a problem or category
  • Add or update a solution in your preferred language
  • At the bottom of your solution file, please add Time and Space Complexities of your code in form of comments.
  • Commit your changes and push them to your fork
  • Create a Pull Request (PR) with a description of the changes and screenshot of passed test cases on any platform.
  • Link the issue with the PR to close it when PR gets merged.

If you want to help improve the repository or have suggestions for new features, feel free to open an issue!

Repository Structure

The repository is organized by categories and subfolders for each problem. Here's an example structure:

- 01 Array
  - 01 reverse_the_array
    - problem_statement.md   # Problem description
    - python
      - 01 reverse_the_array.py     # Python solution
    - java
      - 01 reverse_the_array.java    # Java solution
    - cpp
      - 01 reverse_the_array.cpp    # C++ solution
  • Each category folder contains problems.
  • Inside each problem folder:
    • problem_statement.md contains the problem description.
    • Language-specific folders (e.g., python, java, cpp) contain the respective solutions.
    • Optionally, there might be test files for validating solutions.

Supported Languages

We encourage contributors to add solutions in any language of their choice!

How to Add Your Solution

To add a new solution:

  1. Navigate to the appropriate category folder (e.g., 01 Array).
  2. Create a new folder for the problem (e.g., 01 reverse_the_array).
  3. Add the following:
    • problem_statement.md: The problem description (you can use the template provided).
    • Solution file(s): Add your solution in the language of your choice with time and space complexities in comments.
  4. Once you're done, commit your changes and create a pull request.

Test Your Solutions

We recommend that you test your solution thoroughly before submitting it. If your solution passes all the test cases on the respective platform (e.g., LeetCode, GeeksforGeeks), you can proceed with submitting it.


Thank you for contributing! 🚀

Releases

No releases published

Packages

No packages published

Languages