Skip to content

Commit a1aba40

Browse files
authored
Merge pull request #3 from TheAlgorithms/master
Upgrade From PR
2 parents 9a0da52 + b4d104d commit a1aba40

File tree

262 files changed

+15735
-14637
lines changed

Some content is hidden

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

262 files changed

+15735
-14637
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Device Specification**
27+
28+
**Additional context**
29+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/pull_request_template.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
### **Describe your change:**
2+
3+
- [ ] Add an algorithm?
4+
- [ ] Fix a bug or typo in an existing algorithm?
5+
- [ ] Documentation change?
6+
7+
#### References
8+
9+
<!-- Add any reference to previous pull-request or issue -->
10+
11+
### **Checklist:**
12+
13+
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->
14+
15+
- [ ] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Java/blob/master/CONTRIBUTING.md).
16+
- [ ] This pull request is all my own work -- I have not plagiarized.
17+
- [ ] I know that pull requests will not be merged if they fail the automated tests.
18+
- [ ] This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
19+
- [ ] All new Java files are placed inside an existing directory.
20+
- [ ] All filenames are in all uppercase characters with no spaces or dashes.
21+
- [ ] All functions and variable names follow Java naming conventions.
22+
- [ ] All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
23+
- [ ] If this pull request resolves one or more open issues then the commit message contains `Fixes: #{$ISSUE_NO}`.

.github/stale.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Configuration for probot-stale - https://github.com/probot/stale
2+
3+
# Number of days of inactivity before an Issue or Pull Request becomes stale
4+
daysUntilStale: 30
5+
6+
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
7+
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
8+
daysUntilClose: 7
9+
10+
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
11+
onlyLabels: []
12+
13+
# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
14+
exemptLabels:
15+
- "Status: on hold"
16+
17+
# Set to true to ignore issues in a project (defaults to false)
18+
exemptProjects: false
19+
20+
# Set to true to ignore issues in a milestone (defaults to false)
21+
exemptMilestones: false
22+
23+
# Set to true to ignore issues with an assignee (defaults to false)
24+
exemptAssignees: false
25+
26+
# Label to use when marking as stale
27+
staleLabel: stale
28+
29+
# Limit the number of actions per hour, from 1-30. Default is 30
30+
limitPerRun: 5
31+
32+
# Comment to post when removing the stale label.
33+
# unmarkComment: >
34+
# Your comment here.
35+
36+
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
37+
pulls:
38+
# Comment to post when marking as stale. Set to `false` to disable
39+
markComment: >
40+
This pull request has been automatically marked as stale because it has not had
41+
recent activity. It will be closed if no further activity occurs. Thank you
42+
for your contributions.
43+
44+
# Comment to post when closing a stale Pull Request.
45+
closeComment: >
46+
Please reopen this pull request once you commit the changes requested
47+
or make improvements on the code. If this is not the case and you need
48+
some help, feel free to seek help from our [Gitter](https://gitter.im/TheAlgorithms)
49+
or ping one of the reviewers. Thank you for your contributions!
50+
51+
issues:
52+
# Comment to post when marking as stale. Set to `false` to disable
53+
markComment: >
54+
This issue has been automatically marked as stale because it has not had
55+
recent activity. It will be closed if no further activity occurs. Thank you
56+
for your contributions.
57+
58+
# Comment to post when closing a stale Issue.
59+
closeComment: >
60+
Please reopen this issue once you add more information and updates here.
61+
If this is not the case and you need some help, feel free to seek help
62+
from our [Gitter](https://gitter.im/TheAlgorithms) or ping one of the
63+
reviewers. Thank you for your contributions!

.github/workflows/build.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build Project
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-python@v2
15+
- name: Set up JDK 12
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 12
19+
- run: find . -type f -name "*.java" > sources.txt
20+
- run: javac @sources.txt

.github/workflows/checkstyle.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Code Formatter
2+
3+
on: [push, pull_request]
4+
jobs:
5+
format:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- uses: actions/setup-python@v2
10+
- name: Set up JDK 12
11+
uses: actions/setup-java@v1
12+
with:
13+
java-version: 12
14+
- run: wget https://github.com/google/google-java-format/releases/download/google-java-format-1.9/google-java-format-1.9-all-deps.jar -O formatter.jar
15+
- run: java -jar formatter.jar --replace --set-exit-if-changed $(find . -type f -name "*.java")
16+
- name: Commit Format changes
17+
if: failure()
18+
run: |
19+
git diff
20+
git config --global user.name github-actions
21+
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
22+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
23+
git commit -am "Formatted with Google Java Formatter" || true
24+
git push --force origin HEAD:$GITHUB_REF || true

.github/workflows/prettier.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Prettier
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- Development
9+
10+
jobs:
11+
prettier:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.head_ref }}
19+
20+
- name: Prettify code
21+
uses: creyD/[email protected]
22+
with:
23+
prettier_options: --write **/*.{java}
24+
commit_message: 'feat: prettify code'
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
os: linux
2+
dist: focal
3+
language: java
4+
script:
5+
- find . -type f -name "*.java" > sources.txt
6+
- javac -Xlint:deprecation -Xlint:unchecked @sources.txt
7+
notifications:
8+
webhooks: https://www.travisbuddy.com/
9+
on_success: never
10+
on_failure: always

CONTRIBUTING.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,26 @@
44

55
#### **Did you find a bug?**
66

7-
* **Ensure the bug was not already reported** by searching on GitHub under [Project Issues](https://github.com/TheAlgorithms/Java/issues).
7+
- **Ensure the bug was not already reported** by searching on GitHub under [Project Issues](https://github.com/TheAlgorithms/Java/issues).
88

9-
* Please avoid opening issues asking to be "assigned” to a particular algorithm. This merely creates unnecessary noise for maintainers. Instead, please submit your implementation in a pull request and it will be evaluated by project maintainers.
9+
- Please avoid opening issues asking to be "assigned” to a particular algorithm. This merely creates unnecessary noise for maintainers. Instead, please submit your implementation in a pull request and it will be evaluated by project maintainers.
1010

11-
* If you are unable to find an open issue refering to the same problem, depending on the type of issue follow the appropriate steps:
11+
- If you are unable to find an open issue referring to the same problem, depending on the type of issue follow the appropriate steps:
1212

1313
#### **Do you want to contribute to the documentation?**
1414

15-
* Please read the documentation in here [Contributing to the Documentation]() ,[open a new one issue](https://github.com/TheAlgorithms/Java/issues/new), make changes and then create a pull request, it will be put under review and accepted if it is approprite.
15+
- Please read the documentation in here [Contributing to the Documentation]() ,[open a new one issue](https://github.com/TheAlgorithms/Java/issues/new), make changes and then create a pull request, it will be put under review and accepted if it is appropriate.
1616

1717
#### **Do you want to add a new feature?**
18-
* [Open a new one issue](https://github.com/TheAlgorithms/Java/issues/new). Be sure to include a **title and a clear description** and a **test case** demonstrating the new feature that you want to add to the project.
18+
19+
- [Open a new one issue](https://github.com/TheAlgorithms/Java/issues/new). Be sure to include a **title and a clear description** and a **test case** demonstrating the new feature that you want to add to the project.
1920

2021
#### **Do you want to fix a bug?**
21-
* [Open a new one issue](https://github.com/TheAlgorithms/Java/issues/new).Be sure to include a **title and a clear description** and a **test case** demonstrating the expected behaviour that is not occuring.
22+
23+
- [Open a new one issue](https://github.com/TheAlgorithms/Java/issues/new).Be sure to include a **title and a clear description** and a **test case** demonstrating the expected behaviour that is not occurring.
2224

2325
#### **Do you have questions about the source code?**
2426

25-
* Ask any question about how to use the repository in the [TheAlgorithms room in GITTER](https://gitter.im/TheAlgorithms/community?source=orgpage#) or [open a new one issue](https://github.com/TheAlgorithms/Java/issues/new)
27+
- Ask any question about how to use the repository in the [TheAlgorithms room in GITTER](https://gitter.im/TheAlgorithms/community?source=orgpage#) or [open a new one issue](https://github.com/TheAlgorithms/Java/issues/new)
2628

2729
:+1::tada: That's all you need to know about the process now it's your turn to help us improve the repository, thank you again! :+1::tada:

0 commit comments

Comments
 (0)