Skip to content

Commit 78fd7b1

Browse files
authored
Merge pull request #1 from AllAlgorithms/master
Merge
2 parents 6e58f90 + e53da69 commit 78fd7b1

File tree

233 files changed

+10247
-1370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+10247
-1370
lines changed

.editorconfig

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/contributing.md

Lines changed: 1 addition & 137 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,3 @@
11
## Contributing
22

3-
> Please note that this project is released with a [Contributor Code of Conduct](code-of-conduct.md). By participating in this project you agree to abide by its terms.
4-
5-
## See
6-
7-
- [General Rules](#general-rules)
8-
- [All ▲lgorithms Structure](#all-lgorithms-structure)
9-
- [Adding new algorithms](#adding-new-algorithms)
10-
- [Style](#style)
11-
- [Adding Documentation](#adding-documentation)
12-
- [Run it online](#run-it-online)
13-
14-
### General Rules
15-
16-
- As much as possible, try to follow the existing format of markdown and code.
17-
18-
### All ▲lgorithms Structure
19-
20-
> We follow this structure
21-
22-
- Directories and files are all in lower case letter.
23-
- Directories are separated by a minus or hyphen (`-`) following `kebeab-case` style. In libraries this may change to follow the standards of the programming language
24-
- Files are separated by an underscore (`_`) following the `snake_case` style. This could change to follow style standards on some languages like Java where we are using `CamelCase` style.
25-
26-
```
27-
├── sorting
28-
│ │── merge_sort.cpp
29-
│ └── insertion_sort.cpp
30-
├── searches
31-
│ │── binary_search.cpp
32-
│ └── linear_search.cpp
33-
└── math
34-
├── third-algorithm.cpp
35-
└── fourth_algorithm.cpp
36-
```
37-
38-
### Adding new algorithms
39-
40-
- Make your pull requests to be **specific** and **focused**. Instead of contributing "several algorithms" all at once contribute them all one by one separately (i.e. one pull request for "Binary Search", another one
41-
for "Bubble Sort" and so on).
42-
- Describe what you do in code using **comments**.
43-
44-
### Style
45-
46-
We are following the [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html), make sure you use it in your algorithms implementations.
47-
48-
If you are lazy to read the Google C++ Style Guide, we already tough about you. You must use the [Tutorial Point Formatter](https://www.tutorialspoint.com/online_c_formatter.htm). **This is only to help you get started, you should double check it again**. See the below example:
49-
50-
##### Important
51-
52-
Use:
53-
54-
```c++
55-
if()
56-
{
57-
}
58-
```
59-
60-
Instead of:
61-
62-
```c++
63-
if() {
64-
}
65-
```
66-
67-
Each `.cpp` file should have the following header
68-
69-
```cpp
70-
//
71-
// Binary search works for a sorted array.
72-
// More documentation about the algorithm
73-
//
74-
// The All ▲lgorithms Project
75-
//
76-
// https://allalgorithms.com/
77-
// https://github.com/allalgorithms/cpp
78-
//
79-
// Contributed by: Carlos Abraham Hernandez
80-
// Github: @abranhe
81-
//
82-
#include <iostream>
83-
```
84-
85-
If the algorithm is modified, this should be included there also.
86-
87-
```cpp
88-
// https://github.com/allalgorithms/cpp
89-
//
90-
// Contributed by: Carlos Abraham Hernandez
91-
// Github: @abranhe
92-
//
93-
// Modified by: Your Name
94-
// Github: @yourgithubusername
95-
//
96-
```
97-
98-
If the algorithm have been modified by multiple contributors, that should be included as follow.
99-
100-
```cpp
101-
// https://github.com/allalgorithms/cpp
102-
//
103-
// Contributed by: Carlos Abraham Hernandez
104-
// Github: @abranhe
105-
//
106-
// Modifiers:
107-
// Your Name, @yourgithubusername
108-
// Your friend's name, @yourfriendongithub
109-
//
110-
...
111-
```
112-
113-
C style should be on the [C repository](https://github.com/allalgorithms/c) so:
114-
115-
```cpp
116-
#include <stdio.h>
117-
```
118-
119-
Should not be included, use instead
120-
121-
```cpp
122-
#include <cstdio>
123-
```
124-
125-
### Adding Documentation
126-
127-
Please make sure if you add an algorithm, you also add the required documentation for it on [github.com/abranhe/algorithms](https://github.com/abranhe/algorithms), following the [template](https://github.com/abranhe/algorithms/blob/master/.github/category-template/algorithm-template/readme.md).
128-
129-
130-
### Run it online
131-
132-
On the documentation make sure you add a run it online [Repl.it](https://repl.it/).
133-
134-
If you are modifying an algorithm make sure you add a benchmark using [Repl.it](https://repl.it/).
135-
136-
137-
#### Lastly and not less important:
138-
139-
Make sure you start ⭐️ and follow [@abranhe](https://github.com/abranhe)
3+
> Please note that this project is released with a [Contributor Code of Conduct](code-of-conduct.md). By participating in this project you agree to abide by its terms.

.github/issue-template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I am creating an issue because...

.github/issue_template.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/pull-request-template.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
I am creating a pull request for...
2+
3+
- [ ] New algorithm
4+
- [ ] Update to an algorithm
5+
- [ ] Fix an error
6+
- [ ] Other - *Describe below*

.github/pull_request_template.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)