Skip to content

Impl tim sort #2126

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
735 commits
Select commit Hold shift + click to select a range
d2870c8
Merge pull request #1365 from TheAlgorithms/revert-1362-z-function
deadshotsb Jul 22, 2020
0ce51e8
Added deleteNode method
Jul 23, 2020
e683343
Added Count Digit program
Utsav1999 Jul 25, 2020
ce5ca17
Update for zero and negative numbers
Utsav1999 Jul 25, 2020
8ddbed6
Merge pull request #1366 from rbshealy/feature
StepfenShawn Jul 26, 2020
da29549
updated with Maths package
Utsav1999 Jul 26, 2020
7f944d9
updated with Maths package
Utsav1999 Jul 26, 2020
33b982e
Merge pull request #1369 from Utsav1999/utsav-math
deadshotsb Jul 26, 2020
13925aa
updating DIRECTORY.md
Jul 26, 2020
2890797
Merge pull request #1363 from shellhub/master
realDuYuanChao Jul 30, 2020
c3136e2
Update and rename Perfect BinarySearch to PerfectBinarySearch.java
StepfenShawn Jul 30, 2020
6a79ea7
updating DIRECTORY.md
Jul 30, 2020
3b7dae8
Update PerfectBinarySearch.java
StepfenShawn Jul 30, 2020
de4b2be
Use public class
StepfenShawn Jul 31, 2020
84f5038
Add HashMapLinearProbing.java and MainLinearProbing.java
Aug 1, 2020
6f8f5be
Update and rename Minimum sum partition to MinimumSumPartition.java
hrishikeshpadhye Aug 2, 2020
c58d96b
Merge pull request #1383 from iamhrishikeshpadhye/patch-1
StepfenShawn Aug 2, 2020
9842846
updating DIRECTORY.md
Aug 2, 2020
90f59aa
Update class name
StepfenShawn Aug 2, 2020
e5a422d
Rename BoardPath to BoardPath.java
StepfenShawn Aug 2, 2020
c53810b
updating DIRECTORY.md
Aug 2, 2020
f729092
Use public class HashMapLinearProbing
rbshealy Aug 2, 2020
763bf77
Merge pull request #1382 from rbshealy/feature
StepfenShawn Aug 2, 2020
fdbb7ad
updating DIRECTORY.md
Aug 2, 2020
0ba52b9
Rename GraphAlgos to GraphAlgos.java
StepfenShawn Aug 3, 2020
1e64653
updating DIRECTORY.md
Aug 3, 2020
697d25b
Add nested linked list and node class to HashMap.java
Aug 5, 2020
bc7e3fd
use public class HashMap
rbshealy Aug 5, 2020
4be90d8
Merge pull request #1391 from rbshealy/master
StepfenShawn Aug 7, 2020
851df78
Add javadoc comments and Cleanup DynamicArray.java
Aug 7, 2020
460a8d0
Add white-space
rbshealy Aug 7, 2020
6079b4b
* reduce code
realDuYuanChao Aug 10, 2020
5fd352f
Merge pull request #1406 from shellhub/dev
yanglbme Aug 10, 2020
eb75ce5
Update RomanToInteger.java
Pa1sathvik Aug 10, 2020
0c75460
Merge pull request #1407 from Pa1sathvik/master
StepfenShawn Aug 11, 2020
6da8a00
BubbleSort Recursion
realDuYuanChao Aug 11, 2020
ea34a03
updating DIRECTORY.md
Aug 11, 2020
73888a6
Added insert by index
rnitish Aug 11, 2020
3cb9adf
Merge pull request #1409 from shellhub/dev
yanglbme Aug 12, 2020
2bd49e4
* fix doc
realDuYuanChao Aug 12, 2020
22e2e74
add NumberOfDigits
realDuYuanChao Aug 12, 2020
9a62567
updating DIRECTORY.md
Aug 12, 2020
ab88fed
Merge pull request #1396 from rbshealy/master
StepfenShawn Aug 13, 2020
1eb9dcb
Merge pull request #1411 from shellhub/dev
realDuYuanChao Aug 14, 2020
c9fb43b
Update and rename ListAddnFun to ListAddnFun.java
rbshealy Aug 15, 2020
f2b50c0
duplicate with NumberOfDigits.java
realDuYuanChao Aug 16, 2020
5e6c5a3
Calculate area of various geometric shapes
realDuYuanChao Aug 16, 2020
3e16901
add average
realDuYuanChao Aug 16, 2020
affddc5
updating DIRECTORY.md
Aug 16, 2020
a9c141f
Merge pull request #1415 from shellhub/dev
realDuYuanChao Aug 16, 2020
9b9ce4b
Merge pull request #1414 from rbshealy/patch-1
StepfenShawn Aug 16, 2020
53d5cf0
updating DIRECTORY.md
Aug 16, 2020
96345ad
* factorial using using iteration
realDuYuanChao Aug 16, 2020
1420e2d
* add LucasSeries
realDuYuanChao Aug 16, 2020
ada4b6c
updating DIRECTORY.md
Aug 16, 2020
f32a63e
Merge pull request #1416 from shellhub/dev
realDuYuanChao Aug 16, 2020
918189e
Add PythagoreanTriple.java
Aug 16, 2020
1605716
Add assert statement
Aug 16, 2020
98a191c
Update and rename heap_sort.java to HeapSort.java
StepfenShawn Aug 16, 2020
0a086da
updating DIRECTORY.md
Aug 16, 2020
b4839c2
Added SumOfDigits
realDuYuanChao Aug 16, 2020
f9ae088
updating DIRECTORY.md
Aug 16, 2020
eea5158
Merge pull request #1418 from shellhub/master
realDuYuanChao Aug 16, 2020
ae5536b
Fix array initialization
rbshealy Aug 16, 2020
9a31b96
Fix array initialization
rbshealy Aug 16, 2020
ea43d70
Merge pull request #1417 from rbshealy/master
StepfenShawn Aug 16, 2020
13bb195
updating DIRECTORY.md
Aug 16, 2020
ee11fca
Merge pull request #1410 from rnitish/master
StepfenShawn Aug 17, 2020
5070a0b
Create FindAverage.java
drabbit75 Aug 17, 2020
efdd1dd
DS: Binary Search Tree added Closes #1420
Lakhan-Nad Aug 17, 2020
ed1273a
Add dynamic hash table functionality
Aug 17, 2020
9486101
Revert "Create FindAverage.java"
drabbit75 Aug 18, 2020
94a6596
Update Average.java
drabbit75 Aug 18, 2020
5ea5309
Merge pull request #1423 from drabbit75/master
drabbit75 Aug 18, 2020
75480d4
Tests added for BST DataStructures
Lakhan-Nad Aug 18, 2020
1856152
updating DIRECTORY.md
Aug 18, 2020
35ccbd9
Merge pull request #1421 from Lakhan-Nad/master
StepfenShawn Aug 19, 2020
cccc898
Create Mode.java
gijsh21 Aug 20, 2020
bbe6f94
Apply suggestions from code review
gijsh21 Aug 20, 2020
d803b21
Merge pull request #1425 from gijsh21/mode
realDuYuanChao Aug 20, 2020
da83051
updating DIRECTORY.md
Aug 20, 2020
8c5ec65
* add AliquotSum
realDuYuanChao Aug 20, 2020
34869cb
optimization
realDuYuanChao Aug 20, 2020
a8070bd
updating DIRECTORY.md
Aug 20, 2020
d6947d0
Merge pull request #1426 from shellhub/dev
realDuYuanChao Aug 20, 2020
1e80212
Update AnyBaseToAnyBase.java
drabbit75 Aug 21, 2020
c771089
test using rand numbers
realDuYuanChao Aug 23, 2020
01e2c10
Merge pull request #1430 from shellhub/master
realDuYuanChao Aug 23, 2020
14b2716
Added pull request template
realDuYuanChao Aug 23, 2020
03711d4
Merge pull request #1431 from shellhub/master
realDuYuanChao Aug 23, 2020
f90a8be
Merge pull request #1428 from drabbit75/master
drabbit75 Aug 24, 2020
6356db0
* rename file
realDuYuanChao Aug 25, 2020
1d0bc46
updating DIRECTORY.md
Aug 25, 2020
94bb208
Update Maths/Armstrong.java
realDuYuanChao Aug 25, 2020
56afccc
Merge pull request #1436 from shellhub/dev
realDuYuanChao Aug 25, 2020
b7a0562
Merge pull request #1422 from rbshealy/master
StepfenShawn Aug 26, 2020
19176d9
rename file
realDuYuanChao Aug 26, 2020
3d3ca09
updating DIRECTORY.md
Aug 26, 2020
7d41133
Merge pull request #1437 from shellhub/dev
realDuYuanChao Aug 26, 2020
0f4905d
* Lower.java
realDuYuanChao Aug 26, 2020
e88ff87
updating DIRECTORY.md
Aug 26, 2020
9255c71
Merge pull request #1439 from shellhub/dev
realDuYuanChao Aug 26, 2020
1b09878
update Stack
realDuYuanChao Aug 27, 2020
5606a8d
update Java/Maths/PrimeFactorization.java
Aug 27, 2020
dac62ff
Merge pull request #1441 from ThirdGoddess/branch1
realDuYuanChao Aug 27, 2020
9c9c5df
Merge pull request #1442 from shellhub/dev
realDuYuanChao Aug 28, 2020
68bb2db
rotation string
realDuYuanChao Aug 30, 2020
93cee09
Modify to prevent memory leaks.
Aug 31, 2020
6f9d13b
Merge pull request #1444 from ThirdGoddess/ThirdGoddess
realDuYuanChao Aug 31, 2020
e7193aa
Update MinimumSumPartition.java
tribbleofjim Sep 6, 2020
928f212
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
880240c
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
9672ffc
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
e27175b
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
6fdd9c9
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
e8a4628
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
ad3bb81
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
6951230
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
86d6e93
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
3e727e3
Update DynamicProgramming/MinimumSumPartition.java
tribbleofjim Sep 6, 2020
f2f42f3
Merge pull request #1445 from tribbleofjim/patch-1
realDuYuanChao Sep 6, 2020
c4a4b67
updating DIRECTORY.md
Sep 8, 2020
09a4db6
updated BucketSort
realDuYuanChao Sep 8, 2020
7de8661
Merge pull request #1449 from shellhub/dev
realDuYuanChao Sep 8, 2020
20d82c5
Update Sorts/BucketSort.java
realDuYuanChao Sep 8, 2020
ddd98a9
Merge pull request #1450 from shellhub/dev-1
realDuYuanChao Sep 8, 2020
4ab0548
* Added arithmetic series
realDuYuanChao Sep 13, 2020
86e90cd
updating DIRECTORY.md
Sep 13, 2020
0599981
Merge pull request #1451 from shellhub/dev
realDuYuanChao Sep 13, 2020
cdd662c
Added ProjectEuler
realDuYuanChao Sep 13, 2020
fb36493
updating DIRECTORY.md
Sep 13, 2020
89ae3d5
Updated StackArrayList
realDuYuanChao Sep 14, 2020
7021793
Merge pull request #1452 from shellhub/ProjectEuler
realDuYuanChao Sep 14, 2020
3fb71bc
Merge pull request #1453 from shellhub/dev
realDuYuanChao Sep 14, 2020
623210b
Created Problem04 in project_euler
realDuYuanChao Sep 14, 2020
c0c8305
updating DIRECTORY.md
Sep 14, 2020
7536ef4
Merge pull request #1454 from shellhub/master
realDuYuanChao Sep 15, 2020
db819c2
Created Problem06 in ProjectEuler
realDuYuanChao Sep 16, 2020
a195c69
updating DIRECTORY.md
Sep 16, 2020
b5fea3c
Merge pull request #1461 from shellhub/master
realDuYuanChao Sep 17, 2020
4d30103
added TwoPointersAlgo
varunvjha Sep 17, 2020
0be35c6
Update TwoPointersAlgo.java
varunvjha Sep 17, 2020
2ecef7e
Update DIRECTORY.md
varunvjha Sep 17, 2020
47ad7ec
reformat code
realDuYuanChao Sep 17, 2020
55bd96b
remove link
realDuYuanChao Sep 17, 2020
1fda9f6
Merge pull request #1467 from varunvjha/varun-patch
realDuYuanChao Sep 17, 2020
f9bb4a5
updating DIRECTORY.md
Sep 17, 2020
0646f5e
Update README.md
arrnavvv Sep 17, 2020
db32fbb
Update README.md
arrnavvv Sep 17, 2020
e44390f
Merge pull request #1468 from arrnavvv/patch-1
realDuYuanChao Sep 18, 2020
1490b03
Created Problem07 in Project Euler
realDuYuanChao Sep 18, 2020
6e6c451
updating DIRECTORY.md
Sep 18, 2020
ebdf7be
Update PasswordGen.java
arrnavvv Sep 18, 2020
88ac7cf
Merge pull request #1470 from arrnavvv/master
realDuYuanChao Sep 18, 2020
3c07927
Merge pull request #1469 from shellhub/dev
realDuYuanChao Sep 18, 2020
c41d10a
Created SubsetSum.java
Sep 20, 2020
26cd941
* Update SinglyLinkedList
realDuYuanChao Sep 22, 2020
e533272
updating DIRECTORY.md
Sep 22, 2020
c7f605e
Merge pull request #1476 from shellhub/dev
realDuYuanChao Sep 22, 2020
e5a3e4b
reformat code
realDuYuanChao Sep 22, 2020
cfbd629
Merge pull request #1473 from jessedadams/add-jesse-adams
realDuYuanChao Sep 22, 2020
db86674
updating DIRECTORY.md
Sep 22, 2020
093cc37
count singly linked list using recursion
realDuYuanChao Sep 22, 2020
e98693b
search element
realDuYuanChao Sep 22, 2020
cc0e351
search in singly linked list using recursion
realDuYuanChao Sep 22, 2020
e003f9a
get element at special index
realDuYuanChao Sep 22, 2020
d4e16ab
updating DIRECTORY.md
Sep 22, 2020
d0962bc
Merge pull request #1477 from shellhub/dev
realDuYuanChao Sep 22, 2020
2f2e944
Create Problem12.java
deadshotsb Sep 30, 2020
afddfd0
Add comment above parameterised constructor
nishant-ingle Oct 1, 2020
8885855
Merge pull request #1521 from Nishant-Ingle/master
yanglbme Oct 2, 2020
eb3fc30
Remove unnecassary variable usage.
Sangaibisi Oct 4, 2020
d18db03
Merge pull request #1596 from Sangaibisi/development
yanglbme Oct 5, 2020
064d941
Update Problem12.java
deadshotsb Oct 6, 2020
8ad87ce
reformat
realDuYuanChao Oct 6, 2020
56196c8
Merge pull request #1487 from deadshotsb/master
realDuYuanChao Oct 6, 2020
d7a5dbe
updating DIRECTORY.md
Oct 6, 2020
1bf0fe0
LPS algorithm
matteomessmer Oct 9, 2020
196fcb3
LPS algorithm fix
matteomessmer Oct 9, 2020
9bcb7f5
Fixes: #1709
matteomessmer Oct 9, 2020
60c0291
added tests
matteomessmer Oct 10, 2020
a19d8b2
Merge pull request #1713 from matteomessmer/LongestPalindromicSubsequ…
rbshealy Oct 14, 2020
0cc2808
updating DIRECTORY.md
Oct 14, 2020
3d7a6cb
feat: add new workflow
yanglbme Oct 23, 2020
84d92d0
feat: prettify code
yanglbme Oct 23, 2020
cfd0bd6
remove invalid file
realDuYuanChao Oct 24, 2020
3b19b12
fixed build error
realDuYuanChao Oct 24, 2020
ddff7ef
add build action
realDuYuanChao Oct 24, 2020
6aa373e
fixed action
realDuYuanChao Oct 24, 2020
14ebae6
test build error
realDuYuanChao Oct 24, 2020
c4f5729
complete build action
realDuYuanChao Oct 24, 2020
409d1b6
remove prettier
realDuYuanChao Oct 24, 2020
e3e3f8f
updating DIRECTORY.md
Oct 24, 2020
05e31a8
Merge pull request #1931 from shellhub/build-action
realDuYuanChao Oct 24, 2020
1c5b1d0
rename jobs
realDuYuanChao Oct 24, 2020
3cb663a
Merge pull request #1932 from shellhub/dev
realDuYuanChao Oct 24, 2020
c7a931c
add prettier.xml
realDuYuanChao Oct 24, 2020
2de4f31
Merge pull request #1933 from shellhub/dev
realDuYuanChao Oct 24, 2020
6e0e316
Rename prettier.xml to prettier.yml
realDuYuanChao Oct 24, 2020
58f462b
feat: prettify code
Oct 24, 2020
c05dd46
add travis
realDuYuanChao Oct 24, 2020
a463a5c
fixed prettier error
realDuYuanChao Oct 24, 2020
a6181b3
updating DIRECTORY.md
Oct 24, 2020
0f6e15d
Merge pull request #1934 from shellhub/dev
realDuYuanChao Oct 24, 2020
a23bac9
support google java style
realDuYuanChao Oct 24, 2020
5d59a2e
Formatted with Google Java Formatter
Oct 24, 2020
d27ded9
Merge pull request #1935 from shellhub/dev
realDuYuanChao Oct 24, 2020
0db62bb
Formatted with Google Java Formatter
Oct 24, 2020
176675a
fixed travis status link
realDuYuanChao Oct 24, 2020
89ca5d4
fixed action
realDuYuanChao Oct 24, 2020
2e6c7b4
Merge pull request #1939 from TheAlgorithms/dev
realDuYuanChao Oct 24, 2020
6faa2e3
infix to postfix
realDuYuanChao Oct 27, 2020
f2da599
add git diff command
realDuYuanChao Oct 27, 2020
7137ac0
Format with google formatter
realDuYuanChao Oct 27, 2020
6015137
updating DIRECTORY.md
Oct 27, 2020
25b3ff4
Merge pull request #1964 from TheAlgorithms/infix2posfix
realDuYuanChao Oct 27, 2020
9c8ad9c
Update action (#2001)
realDuYuanChao Nov 2, 2020
1b82826
Added Binary Exponentiation Fixes:#1943 (#1945)
Lakhan-Nad Nov 16, 2020
6ebb159
Formatted with Google Java Formatter
Nov 16, 2020
c232330
Update issue templates
ayaankhan98 Nov 16, 2020
b75bfe3
updating DIRECTORY.md
Nov 16, 2020
486ebc2
Update shell sort documentation (#2033)
realDuYuanChao Nov 18, 2020
23c12f7
Fixed checkstyle and docs (#2035)
realDuYuanChao Nov 18, 2020
52ab5fb
Restricted tower of hanoi implementation with GUI (#561)
vasutomar Nov 22, 2020
d63f470
Formatted with Google Java Formatter
Nov 22, 2020
c85223b
Travis CI: Fix build validation issues, add Xlint options (#2047)
cclauss Nov 26, 2020
95484f8
update SinglyLinkedList (#2058)
realDuYuanChao Dec 1, 2020
74b7426
Solution to Euler Project Problem03 (#2069)
Mickonama Dec 27, 2020
331db36
updating DIRECTORY.md
Dec 27, 2020
568b0b2
add MinimumPathSum DynamicProgramming (#2068)
EATONJIANGHAHAHA Jan 4, 2021
0b88a0a
updating DIRECTORY.md
Jan 4, 2021
ecefcf3
Added new File WordBoggle.java in Java/Misc (#2007)
AzadN Jan 4, 2021
936861c
Formatted with Google Java Formatter
Jan 4, 2021
be8432c
Fixes: #2057 (#2086)
sameerahmedk Feb 3, 2021
b8c1177
updating DIRECTORY.md
Feb 3, 2021
d1e7501
FIXES: #2056 (#2085)
sameerahmedk Feb 3, 2021
912be91
Fixed Spelling error. See issue #2055 (#2083)
sameerahmedk Feb 3, 2021
93d1a5c
Create stale.yml
AnupKumarPanwar Feb 11, 2021
a475463
reducing complexity to linear complixity (#2087)
Itayventura Feb 21, 2021
ee64ac8
Formatted with Google Java Formatter
Feb 21, 2021
00b327a
fix spelling errors on CONTRIBUTING.md (#2112)
luke-weller Feb 25, 2021
4607f0b
Update LICENSE
StepfenShawn Feb 25, 2021
f077c8d
added reviewers and maintainers guidelines (#2115)
ayaankhan98 Feb 26, 2021
4264e0f
Added Linear Convolution, FFT, Bluestein's FFT and Circular and Linea…
Feb 26, 2021
ca2e207
Formatted with Google Java Formatter
Feb 26, 2021
b4d104d
Added algorithm for color contrast ratio. (#1794)
SethFalco Feb 27, 2021
6ee92f0
Fully automate dev setup with Gitpod (#2094)
mattisapro Mar 2, 2021
40318a0
chore: upgrade prettier version
yanglbme Mar 2, 2021
9e335db
create and implemented Tim Sort Algorithm
Andreas-White Mar 6, 2021
d20c018
adding wikipedia link in Tim Sort Algorithm
Andreas-White Mar 6, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 0 additions & 7 deletions .classpath

This file was deleted.

29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Device Specification**

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
### **Describe your change:**

- [ ] Add an algorithm?
- [ ] Fix a bug or typo in an existing algorithm?
- [ ] Documentation change?

#### References

<!-- Add any reference to previous pull-request or issue -->

### **Checklist:**

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [ ] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Java/blob/master/CONTRIBUTING.md).
- [ ] This pull request is all my own work -- I have not plagiarized.
- [ ] I know that pull requests will not be merged if they fail the automated tests.
- [ ] This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
- [ ] All new Java files are placed inside an existing directory.
- [ ] All filenames are in all uppercase characters with no spaces or dashes.
- [ ] All functions and variable names follow Java naming conventions.
- [ ] All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
- [ ] If this pull request resolves one or more open issues then the commit message contains `Fixes: #{$ISSUE_NO}`.
63 changes: 63 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Configuration for probot-stale - https://github.com/probot/stale

# Number of days of inactivity before an Issue or Pull Request becomes stale
daysUntilStale: 30

# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
daysUntilClose: 7

# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
onlyLabels: []

# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
exemptLabels:
- "Status: on hold"

# Set to true to ignore issues in a project (defaults to false)
exemptProjects: false

# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: false

# Set to true to ignore issues with an assignee (defaults to false)
exemptAssignees: false

# Label to use when marking as stale
staleLabel: stale

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 5

# Comment to post when removing the stale label.
# unmarkComment: >
# Your comment here.

# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
pulls:
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

# Comment to post when closing a stale Pull Request.
closeComment: >
Please reopen this pull request once you commit the changes requested
or make improvements on the code. If this is not the case and you need
some help, feel free to seek help from our [Gitter](https://gitter.im/TheAlgorithms)
or ping one of the reviewers. Thank you for your contributions!

issues:
# Comment to post when marking as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.

# Comment to post when closing a stale Issue.
closeComment: >
Please reopen this issue once you add more information and updates here.
If this is not the case and you need some help, feel free to seek help
from our [Gitter](https://gitter.im/TheAlgorithms) or ping one of the
reviewers. Thank you for your contributions!
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Project

on:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Set up JDK 12
uses: actions/setup-java@v1
with:
java-version: 12
- run: find . -type f -name "*.java" > sources.txt
- run: javac @sources.txt
24 changes: 24 additions & 0 deletions .github/workflows/checkstyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Code Formatter

on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@v2
- name: Set up JDK 12
uses: actions/setup-java@v1
with:
java-version: 12
- 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
- run: java -jar formatter.jar --replace --set-exit-if-changed $(find . -type f -name "*.java")
- name: Commit Format changes
if: failure()
run: |
git diff
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git commit -am "Formatted with Google Java Formatter" || true
git push --force origin HEAD:$GITHUB_REF || true
26 changes: 26 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Prettier

on:
pull_request:
push:
branches:
- master
- Development

jobs:
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Prettify code
uses: creyD/prettier_action@v3.3
with:
prettier_options: --write **/*.{java}
commit_message: 'style: prettify code'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67 changes: 67 additions & 0 deletions .github/workflows/update_directory_md.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This GitHub Action updates the DIRECTORY.md file (if needed) when doing a git push
name: update_directory_md
on: [push]
jobs:
update_directory_md:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-python@master
- name: update_directory_md
shell: python
run: |
import os
from typing import Iterator

URL_BASE = "https://github.com/TheAlgorithms/Java/blob/master"
g_output = []


def good_filepaths(top_dir: str = ".") -> Iterator[str]:
for dirpath, dirnames, filenames in os.walk(top_dir):
dirnames[:] = [d for d in dirnames if d[0] not in "._"]
for filename in filenames:
if os.path.splitext(filename)[1].lower() == ".java":
yield os.path.join(dirpath, filename).lstrip("./")


def md_prefix(i):
return f"{i * ' '}*" if i else "\n##"


def print_path(old_path: str, new_path: str) -> str:
global g_output
old_parts = old_path.split(os.sep)
for i, new_part in enumerate(new_path.split(os.sep)):
if i + 1 > len(old_parts) or old_parts[i] != new_part:
if new_part:
g_output.append(f"{md_prefix(i)} {new_part.replace('_', ' ')}")
return new_path


def build_directory_md(top_dir: str = ".") -> str:
global g_output
old_path = ""
for filepath in sorted(good_filepaths(), key=str.lower):
filepath, filename = os.path.split(filepath)
if filepath != old_path:
old_path = print_path(old_path, filepath)
indent = (filepath.count(os.sep) + 1) if filepath else 0
url = "/".join((URL_BASE, filepath, filename)).replace(" ", "%20")
filename = os.path.splitext(filename.replace("_", " "))[0]
g_output.append(f"{md_prefix(indent)} [{filename}]({url})")
return "\n".join(g_output)


with open("DIRECTORY.md", "w") as out_file:
out_file.write(build_directory_md(".") + "\n")

- name: Update DIRECTORY.md
run: |
cat DIRECTORY.md
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git add DIRECTORY.md
git commit -am "updating DIRECTORY.md" || true
git push --force origin HEAD:$GITHUB_REF || true
39 changes: 38 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
/bin/
/gradle/wrapper/gradle-wrapper.properties
##----------Android----------
# build
*.apk
*.ap_
*.dex
*.class
bin/
gen/
build/
out/

# gradle
.gradle/
gradle-app.setting
!gradle-wrapper.jar
build/

local.properties

##----------idea----------
*.iml
.idea/
*.ipr
*.iws

# Android Studio Navigation editor temp files
.navigation/

##----------Other----------
# osx
*~
.DS_Store
gradle.properties

.vscode

*.log
7 changes: 7 additions & 0 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM gitpod/workspace-full

# Install custom tools, runtimes, etc.
# For example "bastet", a command-line tetris clone:
# RUN brew install bastet
#
# More information: https://www.gitpod.io/docs/config-docker/
6 changes: 6 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
image:
file: .gitpod.Dockerfile

tasks:
- init: 'echo "TODO: Replace with init/build command"'
command: (e.g. 'npm start', 'yarn watch'...)
17 changes: 0 additions & 17 deletions .project

This file was deleted.

10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
os: linux
dist: focal
language: java
script:
- find . -type f -name "*.java" > sources.txt
- javac -Xlint:deprecation -Xlint:unchecked @sources.txt
notifications:
webhooks: https://www.travisbuddy.com/
on_success: never
on_failure: always
Loading