f515542235
* Update README.md fix typo ./README.md:14: seperated ==> separated * Update string-tokeniser.cpp fix typo ./strings/c-or-cpp/string-tokeniser.cpp:27: delimeter ==> delimiter * Update palindrome.js fix typo ./strings/js/palindrome.js:4: alpha-numeric ==> alphanumeric * Update quick-sort.java fix typo ./sorting/java/quick-sort.java:2: choosen ==> chosen * Update counting-sort.java fix typo ./sorting/java/counting-sort.java:4: algortithm ==> algorithm * Update merge-sort.java fix typo ./sorting/java/merge-sort.java:12: Funtion ==> Function * Update bubble-sort.cpp fix typo ./sorting/c-or-cpp/bubble-sort.cpp:21: swaping ==> swapping * Update and rename Insert_and_delete_beginning.c to Insert-and-delete-beginning.c fix typo ./linked-lists/c-or-cpp/Insert_and_delete_beginning.c:18: Intialize ==> Initialize and rename the file according to contribution guidlines * Update Insert-and-delete-beginning.c fix typo ./linked-lists/c-or-cpp/Insert_and_delete_beginning.c:37: beggining ==> beginning * Update bellman-ford.cpp fix typo ./graphs/c-or-cpp/bellman-ford.cpp:80: weigth ==> weight * Update README.md fix typo ./stacks/README.md:5: Paranthesis ==> Parenthesis * Rename balanced-paranthesis.cpp to balanced-parenthesis.cpp fix typo in name of the file * Update linear-search.cpp fix typos ./searching/c-or-cpp/linear-search.cpp:22: inputed ==> inputted ./searching/c-or-cpp/linear-search.cpp:24: inputed ==> inputted |
||
---|---|---|
.github/workflows | ||
arrays | ||
graphs | ||
linked-lists | ||
multiplication | ||
queues | ||
scheduling | ||
searching | ||
sorting | ||
stacks | ||
strings | ||
trees | ||
.gitignore | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md |
README.md
Data Structures and Algorithm
Data structure and Algorithm (DSA)
Contribution Guidelines
1. Contribution Specifications
The problem being contributed must either be a simple file (Eg. kruskal-algorithm.cpp
, linear-search.java
) or a more complex directory (palindrome/
). This is a unit problem
.
The directory tree has the following convention of category/language/problem
, where category
is the topic or category of the problem being contributed (Eg. strings
, sorting
, linked-lists
etc.), language
represents the language code of the problem (Eg. c-or-cpp
for C/C++, python
for Python, java
for Java etc.), and problem
is a conforming name to the problem (Eg. linear-search.cpp
, palindrome
, queue-linked-list.cpp
etc.)
A unit problem
must conform to the following specifications:
- The name should be in lowercase. (Eg.
palindrome/
,binary-search.cpp
etc.). - Each word must be separated by a dash or a hyphen (
-
).
If you have a problem that belongs to a new topic or category than one which are present:
- Create a new folder and an index for it inside (a readme,
README.md
file). - To each new index file, write the readme with your
problem
in it (Markdown Documentation). - The folder name can also only contain lowercase characters and dashes or hyphens (
-
) (Eg.strings
sorting
etc.)
Simple (File) Contributions
The file should conform to the problem
specification, and the extension (Eg. linear-search.java
, kruskal-algorithm.cpp
, count-inversions.js
etc.)
Project/Folder-based Contributions
The project and folder-based contributions have a bit more stricter contribution contribution specifications.
The folder should conform to the problem
specification, along with the following specifications
Folder Structure
problem-name\
| - .gitignore
| - README.md
| - Makefile # or the specific specification/requirements/configuration file
| - src\
| - main.ext
README.md
Specification / Template
# <Title of the Problem>
< description of the problem >
## Prerequisites
- prerequisite library or package
- [prerequisite library](https://www.example.com/link-to-official-library)
## Instructions
- instructions to run the project
- < Simple and reproducible commands to execute the project >
```bash
make # or 'cargo run', or 'dotnet run' or 'mvn exec:java' etc.
```
## Test Cases & Output < if exists>
< If you can provide test cases, describe it here, else remove this section >
.gitignore
File
# add all output files and build files to be excluded from git tracking
main # executable file also must have the project name
target/ # the build file, for example for rust
Build File / Specification File / Configuration File
It can be any of the following ones
- C/C++:
Makefile
- Python:
requirements.txt
- JavaScript:
package.json
andpackage-lock.json
- Rust:
Cargo.toml
andCargo.lock
- Go:
go.mod
Source Code File
The source code files, should either be in src/
folder (Eg. src/main.cpp
or src/main.js
) or the root folder (Eg. palindrome.go
or App.java
) where ext
is the file extension for the specific programming language.
Again, the source codes must conform to a valid file structure convention that the programming language enforces.
2. Naming Convention
The programming should keep the naming convention rule of each programming language.