Welcome to the Data Structures and Algorithms repository! This repository contains implementations of various data structures and algorithms in C and C++. Whether you're a beginner looking to learn or an experienced developer seeking reference implementations, you've come to the right place.
- Array
- Stack using Array
- Queue using Array
- Circular Queue using Array
- Infix to Postfix Conversion
- Postfix Expression Evaluation
- Linked List
- Stack using Linked List
- Queue using Linked List
- Circular Queue using Linked List
- Priority Queue using Linked List
- Doubly Linked List
- Double Ended Queue using Linked List
- Circular Linked List
- Polynomial Addition using Linked List
- Binary Sorted Tree
- Selection Sort
- Insertion Sort
- Bubble Sort
- Quick Sort
- Merge Sort
- Heap Sort
Make sure you have MinGW installed. You can install it using the following commands:
# Update package list
pacman -Syu
# Install MinGW
pacman -S mingw-w64-x86_64-gcc
Download and install Visual Studio Code. This repository is configured with a .vscode
folder containing useful settings for your coding environment.
Navigate to the specific directory of the code you want to run and use the following commands:
# Compile C code
gcc filename.c -o output_name
# Run C code
./output_name
# Compile C++ code
g++ filename.cpp -o output_name
# Run C++ code
./output_name
We welcome contributions from the community! To contribute to this project, follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
. - Make your changes and commit them with a descriptive commit message.
- Push your changes to your fork:
git push origin feature-name
. - Open a pull request to the main repository.
Certainly! Below is an explanation of the commands for forking and contributing to a GitHub repository, formatted for easy copying and pasting:
-
Fork the repository: Click the "Fork" button at the top right of the repository page. This creates a copy of the repository in your GitHub account.
-
Clone your forked repository: Open your terminal and run the following command to clone the repository to your local machine:
git clone https://github.com/your-username/repository.git
Replace
your-username
with your GitHub username andrepository
with the name of the repository.
-
Create a new branch: Move into the repository directory and create a new branch for your feature or bug fix:
cd repository git checkout -b feature-name
Replace
feature-name
with a descriptive name for your contribution. -
Make your changes: Modify the code, add new features, or fix bugs. Once done, stage and commit your changes:
git add . git commit -m "Description of changes"
Replace "Description of changes" with a concise and descriptive commit message.
-
Push to your fork: Push your changes to your forked repository on GitHub:
git push origin feature-name
Replace
feature-name
with the name of your branch. -
Create a Pull Request (PR): Go to the GitHub page of your forked repository. GitHub will detect the recent push and display a "Compare & pull request" button. Click on it to create a new pull request.
Add a title and description to your pull request, then click "Create Pull Request."
- Add only code file
- Do not add .exe or .out file
We appreciate the open-source community and contributors for making this project better every day. Special thanks to GitHub for providing an excellent platform for collaboration.
Note: Replace filename
and output_name
with the appropriate names for your code file and desired output executable.