From cb442958b34d866258b743734a03fc835eaed3ca Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 18 Oct 2018 01:48:48 +0300 Subject: [PATCH 01/11] Create bubblesort.f95 --- sorting/bubblesort.f95 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sorting/bubblesort.f95 diff --git a/sorting/bubblesort.f95 b/sorting/bubblesort.f95 new file mode 100644 index 0000000..73f0a8e --- /dev/null +++ b/sorting/bubblesort.f95 @@ -0,0 +1,34 @@ +program testbubblesort + integer lst(10) + lst = (/ 10, 9, 8, 4, 5, 6, 7, 3, 2, 1 /) + call bubblesort(lst, 0, 10) + call show(lst) +end program testbubblesort + +subroutine bubblesort(lst, a, b) + integer a + integer b + integer lst(10) + integer x + integer y + integer tmp + do x = a, b-1 + do y = a, b-x-1 + if (lst(y) .gt. lst(y+1)) then + tmp = lst(y) + lst(y) = lst(y+1) + lst(y+1) = tmp + endif + end do + end do +end + +subroutine show(lst) + integer lst(10) + integer x + do x = 1, 10 + print 100, lst(x) + end do + +100 format (i0) +end From 96f1b04591b100b1068412b75c27ca034c6d990c Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 18 Oct 2018 20:18:37 +0300 Subject: [PATCH 02/11] Create insertionsort.f95 --- sorting/insertionsort.f95 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sorting/insertionsort.f95 diff --git a/sorting/insertionsort.f95 b/sorting/insertionsort.f95 new file mode 100644 index 0000000..c2368b3 --- /dev/null +++ b/sorting/insertionsort.f95 @@ -0,0 +1,34 @@ +program testinsertionsort + integer lst(10) + lst = (/ 10, 9, 8, 4, 5, 6, 7, 3, 2, 1 /) + call insertionsort(lst, 0, 10) + call show(lst) +end program testinsertionsort + +subroutine insertionsort(lst, a, b) + integer a + integer b + integer lst(10) + integer key + integer j + integer i + do i = a+1, b + key = lst(i) + j = i - 1 + do while(j .ge. 0 .and. lst(j) .gt. key) + lst(j+1) = lst(j) + j = j - 1 + end do + lst(j+1) = key + end do +end + +subroutine show(lst) + integer lst(10) + integer x + do x = 1, 10 + print 100, lst(x) + end do + +100 format (i0) +end From 8fab3c955f8e47ed16405d9f87de0bfc0dd14c38 Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 18 Oct 2018 20:23:29 +0300 Subject: [PATCH 03/11] Delete insertionsort.f95 --- sorting/insertionsort.f95 | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 sorting/insertionsort.f95 diff --git a/sorting/insertionsort.f95 b/sorting/insertionsort.f95 deleted file mode 100644 index c2368b3..0000000 --- a/sorting/insertionsort.f95 +++ /dev/null @@ -1,34 +0,0 @@ -program testinsertionsort - integer lst(10) - lst = (/ 10, 9, 8, 4, 5, 6, 7, 3, 2, 1 /) - call insertionsort(lst, 0, 10) - call show(lst) -end program testinsertionsort - -subroutine insertionsort(lst, a, b) - integer a - integer b - integer lst(10) - integer key - integer j - integer i - do i = a+1, b - key = lst(i) - j = i - 1 - do while(j .ge. 0 .and. lst(j) .gt. key) - lst(j+1) = lst(j) - j = j - 1 - end do - lst(j+1) = key - end do -end - -subroutine show(lst) - integer lst(10) - integer x - do x = 1, 10 - print 100, lst(x) - end do - -100 format (i0) -end From d2078677fa83cec727fa3cc582e867aea8b53b45 Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 18 Oct 2018 20:24:02 +0300 Subject: [PATCH 04/11] Create insertionsort.f95 --- sorting/insertionsort.f95 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 sorting/insertionsort.f95 diff --git a/sorting/insertionsort.f95 b/sorting/insertionsort.f95 new file mode 100644 index 0000000..c2368b3 --- /dev/null +++ b/sorting/insertionsort.f95 @@ -0,0 +1,34 @@ +program testinsertionsort + integer lst(10) + lst = (/ 10, 9, 8, 4, 5, 6, 7, 3, 2, 1 /) + call insertionsort(lst, 0, 10) + call show(lst) +end program testinsertionsort + +subroutine insertionsort(lst, a, b) + integer a + integer b + integer lst(10) + integer key + integer j + integer i + do i = a+1, b + key = lst(i) + j = i - 1 + do while(j .ge. 0 .and. lst(j) .gt. key) + lst(j+1) = lst(j) + j = j - 1 + end do + lst(j+1) = key + end do +end + +subroutine show(lst) + integer lst(10) + integer x + do x = 1, 10 + print 100, lst(x) + end do + +100 format (i0) +end From 2e02f0dedf6ef032d7a497840f72c18b40b7ae4b Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Fri, 19 Oct 2018 14:27:13 +0300 Subject: [PATCH 05/11] Update bubblesort.f95 Changed "endif" to "end if". --- sorting/bubblesort.f95 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorting/bubblesort.f95 b/sorting/bubblesort.f95 index 73f0a8e..9f81bdb 100644 --- a/sorting/bubblesort.f95 +++ b/sorting/bubblesort.f95 @@ -18,7 +18,7 @@ subroutine bubblesort(lst, a, b) tmp = lst(y) lst(y) = lst(y+1) lst(y+1) = tmp - endif + end if end do end do end From 7b063f1e018189dfc85a3fd5464d0e5278dfba56 Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 25 Oct 2018 09:54:03 +0300 Subject: [PATCH 06/11] Create selectionsort.f95 --- sorting/selectionsort.f95 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 sorting/selectionsort.f95 diff --git a/sorting/selectionsort.f95 b/sorting/selectionsort.f95 new file mode 100644 index 0000000..ae20588 --- /dev/null +++ b/sorting/selectionsort.f95 @@ -0,0 +1,37 @@ +program testselectionsort + integer lst(10) + lst = (/ 10, 9, 8, 4, 5, 6, 7, 3, 2, 1 /) + call selectionsort(lst, 1, 10) + call show(lst) +end program testselectionsort + +subroutine selectionsort(lst, a, b) + integer a + integer b + integer lst(10) + integer i + integer j + integer min_id + integer tmp + do i = a, b-1 + min_id = i + do j = i+1, b + if (lst(min_id) .gt. lst(j)) then + min_id = j + end if + end do + tmp = lst(i) + lst(i) = lst(min_id) + lst(min_id) = tmp + end do +end + +subroutine show(lst) + integer lst(10) + integer x + do x = 1, 10 + print 100, lst(x) + end do + +100 format (i0) +end From 0237884b3c8c8010b9b71843bfac5a66b20d1aad Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 25 Oct 2018 10:50:59 +0300 Subject: [PATCH 07/11] Fixed array index --- sorting/bubblesort.f95 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sorting/bubblesort.f95 b/sorting/bubblesort.f95 index 73f0a8e..9a10851 100644 --- a/sorting/bubblesort.f95 +++ b/sorting/bubblesort.f95 @@ -1,7 +1,7 @@ program testbubblesort integer lst(10) lst = (/ 10, 9, 8, 4, 5, 6, 7, 3, 2, 1 /) - call bubblesort(lst, 0, 10) + call bubblesort(lst, 1, 10) call show(lst) end program testbubblesort @@ -13,12 +13,12 @@ subroutine bubblesort(lst, a, b) integer y integer tmp do x = a, b-1 - do y = a, b-x-1 + do y = a, b-x if (lst(y) .gt. lst(y+1)) then tmp = lst(y) lst(y) = lst(y+1) lst(y+1) = tmp - endif + end if end do end do end From a615957e7c8298f4e4efe51ad657f9b9a73ae2c3 Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 25 Oct 2018 10:52:59 +0300 Subject: [PATCH 08/11] Changed array index --- sorting/insertionsort.f95 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorting/insertionsort.f95 b/sorting/insertionsort.f95 index c2368b3..67816bf 100644 --- a/sorting/insertionsort.f95 +++ b/sorting/insertionsort.f95 @@ -1,7 +1,7 @@ program testinsertionsort integer lst(10) lst = (/ 10, 9, 8, 4, 5, 6, 7, 3, 2, 1 /) - call insertionsort(lst, 0, 10) + call insertionsort(lst, 1, 10) call show(lst) end program testinsertionsort From b8d10ea4d3a8af689ef27f0eb9d522a9d135a6bb Mon Sep 17 00:00:00 2001 From: Kaan Bozkurt Date: Thu, 10 Oct 2019 01:02:45 +0200 Subject: [PATCH 09/11] Create quicksort.f95 --- sorting/quicksort.f95 | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sorting/quicksort.f95 diff --git a/sorting/quicksort.f95 b/sorting/quicksort.f95 new file mode 100644 index 0000000..64bc7d9 --- /dev/null +++ b/sorting/quicksort.f95 @@ -0,0 +1,39 @@ +program testquicksort + integer lst(10) + lst = (/ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 /) + call quicksort(lst, 1, 10) + call show(lst) +end program testquicksort + +recursive subroutine quicksort(lst, start, end_) + integer lst(10) + integer start, end_ + integer pivot, i, tmp + if (start .lt. end_) then + pivot = start + do i = start+1, end_ + if (lst(i) .le. lst(start)) then + pivot = pivot + 1 + tmp = lst(pivot) + lst(pivot) = lst(i) + lst(i) = tmp + end if + end do + tmp = lst(pivot) + lst(pivot) = lst(start) + lst(start) = tmp + + call quicksort(lst, start, pivot) + call quicksort(lst, pivot+1, end_) + end if +end + +subroutine show(lst) + integer lst(10) + integer x + do x = 1, 10 + print 100, lst(x) + end do + +100 format (i0) +end From 6658fccb2a11b41d830d20c3f91e848113702d45 Mon Sep 17 00:00:00 2001 From: Abraham Hernandez Date: Fri, 2 Oct 2020 02:09:55 -0400 Subject: [PATCH 10/11] refactofing! --- .github/code-of-conduct.md | 40 ++ .github/contributing.md | 3 + .github/issue-template.md | 1 + .github/pull-request-template.md | 6 + .../sorting}/bubblesort.f95 | 0 .../sorting}/insertionsort.f95 | 0 {sorting => algorithms/sorting}/mergesort.f95 | 0 .../sorting}/selectionsort.f95 | 0 license | 22 + readme.md | 432 ++++++++++++++++-- src/.gitkeep | 0 11 files changed, 473 insertions(+), 31 deletions(-) create mode 100644 .github/code-of-conduct.md create mode 100644 .github/contributing.md create mode 100644 .github/issue-template.md create mode 100644 .github/pull-request-template.md rename {sorting => algorithms/sorting}/bubblesort.f95 (100%) rename {sorting => algorithms/sorting}/insertionsort.f95 (100%) rename {sorting => algorithms/sorting}/mergesort.f95 (100%) rename {sorting => algorithms/sorting}/selectionsort.f95 (100%) create mode 100644 license create mode 100644 src/.gitkeep diff --git a/.github/code-of-conduct.md b/.github/code-of-conduct.md new file mode 100644 index 0000000..f809c8b --- /dev/null +++ b/.github/code-of-conduct.md @@ -0,0 +1,40 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/.github/contributing.md b/.github/contributing.md new file mode 100644 index 0000000..01f6600 --- /dev/null +++ b/.github/contributing.md @@ -0,0 +1,3 @@ +## Contributing + +> 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. \ No newline at end of file diff --git a/.github/issue-template.md b/.github/issue-template.md new file mode 100644 index 0000000..99764fe --- /dev/null +++ b/.github/issue-template.md @@ -0,0 +1 @@ +I am creating an issue because... diff --git a/.github/pull-request-template.md b/.github/pull-request-template.md new file mode 100644 index 0000000..3bc0935 --- /dev/null +++ b/.github/pull-request-template.md @@ -0,0 +1,6 @@ +I am creating a pull request for... + +- [ ] New algorithm +- [ ] Update to an algorithm +- [ ] Fix an error +- [ ] Other - *Describe below* \ No newline at end of file diff --git a/sorting/bubblesort.f95 b/algorithms/sorting/bubblesort.f95 similarity index 100% rename from sorting/bubblesort.f95 rename to algorithms/sorting/bubblesort.f95 diff --git a/sorting/insertionsort.f95 b/algorithms/sorting/insertionsort.f95 similarity index 100% rename from sorting/insertionsort.f95 rename to algorithms/sorting/insertionsort.f95 diff --git a/sorting/mergesort.f95 b/algorithms/sorting/mergesort.f95 similarity index 100% rename from sorting/mergesort.f95 rename to algorithms/sorting/mergesort.f95 diff --git a/sorting/selectionsort.f95 b/algorithms/sorting/selectionsort.f95 similarity index 100% rename from sorting/selectionsort.f95 rename to algorithms/sorting/selectionsort.f95 diff --git a/license b/license new file mode 100644 index 0000000..559a12b --- /dev/null +++ b/license @@ -0,0 +1,22 @@ +MIT License + +Copyright (c) 2018 All Algorithms and its contributors (allalgorithms.com) +Copyright (c) 2018 Carlos Abraham (abranhe.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/readme.md b/readme.md index ffcd027..dd64172 100644 --- a/readme.md +++ b/readme.md @@ -1,46 +1,416 @@ -
- +We are accepting all pull requests. [Read More](https://github.com/AllAlgorithms/algorithms/issues/40) + +


- -

-

All ▲lgorithms implemented in Fortran

- - - - - +
+ Algorithms Logo +


- algorithms.abranhe.com +
+
+
+ +

+ What is an algorithm?    + Contributing    + Stickers & T-Shirts +

+ + +

+ + Twitter +    + + Instagram +    + + Github +    +

+ +
+

+ Huge collection of All ▲lgorithms implemented in multiple languages +

+
+ + + + + +
+## See -## Contents +- [What is an algorithm](#what-is-an-algorithm) +- [Contributing](https://github.com/AllAlgorithms/algorithms/blob/master/.github/contributing.md) +- [Code of Conduct](https://github.com/AllAlgorithms/algorithms/blob/master/.github/code-of-conduct.md) +- [Stickers and T-Shirts](https://www.redbubble.com/people/abranhe/works/34285088) +- [Twitter](https://twitter.com/AllAlgorithms) +- [Instagram](https://instagram.com/AllAlgorithms) +- [Algorithms Categories](#categories) +- [Maintainers](#maintainers) +- [License](#license) -- [File Transfer Protocol](file-transfer-protocol) -- [Greedy Algorithms](greedy-algorithms) -- [Graphs](graphs) -- [Math](math) -- [Neutral Network](neutral-network) -- [Ciphers](ciphers) -- [Data Structures](data-structures) -- [Dynamic Programming](dynamic-programming) -- [Hashes](hashes) -- [Searches](searches) -- [Sorting](sorting) -- [Strings](strings) -- [Traversals](traversals) -- [Others](others) -## License +## What is an algorithm? + +Informally, an algorithm is any well-defined computational procedure that takes +some value, or set of values, as input and produces some value, or set of values, as +output. An algorithm is thus a sequence of computational steps that transform the +input into the output. + +An algorithm should have three important characteristics to be considered valid: + +- **It should be finite**: If your algorithm never ends trying to solve the problem +it was designed to solve then it is useless +- **It should have well defined instructions**: Each step of the algorithm has to +be precisely defined; the instructions should be unambiguously specified for each case. +- **It should be effective**: The algorithm should solve the problem it was designed +to solve. And it should be possible to demonstrate that the algorithm converges with +just a paper and pencil. + +## Categories + +> Structure of The All ▲lgoritms project + +- [Artificial Intelligence](#artificial-intelligence) +- [Backtracking](#backtracking) +- [Bit Manipulation](#bit-manipulation) +- [Cellular Automaton](#cellular-automaton) +- [Ciphers](#ciphers) +- [Computational Geometry](#computational-geometry) +- [Cryptography](#cryptography) +- [Data Structures](#data-structures) +- [Divide and conquer](#divide-and-conquer) +- [Dynamic Programming](#dynamic-programming) +- [Gaming Theory](#gaming-theory) +- [Graphs](#graphs) +- [Greedy Algorithms](#greedy-algorithms) +- [Math](#math) +- [Networking](#networking) +- [Numerical Analysis](#numerical-analysis) +- [Operating system](#operating-system) +- [Randomized Algorithms](#randomized-algorithms) +- [Searches](#searches) +- [Selections Algorithms](#selections-algorithms) +- [Sorting](#sorting) +- [Strings](#strings) +- [Online Challenges](#online-challenges) +- [Others](#others) + +## [Artificial Intelligence](artificial-intelligence) + +- [Density-based spatial clustering of applications with noise (DBSCAN Clustering)](https://allalgorithms.com/docs/dbscan) +- [Interactive Self-Organizing Data Analysis Technique yAy! (ISODATA Clustering)](https://allalgorithms.com/docs/isodata) +- [Linear Regression](https://allalgorithms.com/docs/linear-regression) +- [Logistic Regression](https://allalgorithms.com/docs/logistic-regression) +- [Neutral Style Transfer](https://allalgorithms.com/docs/neutral-style-transfer) +- [SATisfiable (SAT)](https://allalgorithms.com/docs/sat) +- [Travelling salesman problem (TSP)](https://allalgorithms.com/docs/tsp) +- [A* (A Star)](https://allalgorithms.com/docs/a-star) +- [Artificial Neutral Network](https://allalgorithms.com/docs/artificial-neutral-network) +- [Convolutional Neutral Network](https://allalgorithms.com/docs/convolutional-neutral-network) +- [Decision Tree](https://allalgorithms.com/docs/decision-tree) +- [Factorization Machines](https://allalgorithms.com/docs/factorization-machines) +- [Gaussian Mixture Model](https://allalgorithms.com/docs/gaussian-mixtrue-model) +- [Gradient Boosting Trees](https://allalgorithms.com/docs/gradient-boostring-trees) +- [Hierachical Clustering](https://allalgorithms.com/docs/hierachical-clustering) +- [Image Processing](https://allalgorithms.com/docs/image-processing) +- [K Nearest Neighbors](https://allalgorithms.com/docs/k-nearest-neighbors) +- [K Means](https://allalgorithms.com/docs/k-means) +- [Minimax](https://allalgorithms.com/docs/minimax) +- [Native Bayes](https://allalgorithms.com/docs/native-bayes) +- [Nearest Sequence Memory](https://allalgorithms.com/docs/nearest-sequence-memory) +- [Neutral Network](https://allalgorithms.com/docs/neutral-network) +- [Perceptron](https://allalgorithms.com/docs/perceptron) +- [Principal Component Analysis](https://allalgorithms.com/docs/principal-component-analysis) +- [Q Learing](https://allalgorithms.com/docs/q-learning) +- [Random Forests](https://allalgorithms.com/docs/random-forest) +- [Restricted Boltzman Machine](https://allalgorithms.com/docs/restricted-boltzman-machine) + +## [Backtracking](backtracking) + +- [Algorithm X](backtracking/algorithm-x) +- [Crossword Puzzle](backtracking/crossword-Puzzle) +- [Knight Tour](backtracking/knight-tour) +- [M Coloring Problem](backtracking/m-coloring-problem) +- [N Queen](backtracking/n-queen) +- [Number of ways in Maze](backtracking/number-of-ways-in-maze) +- [Partitions of set](backtracking/partitions-of-set) +- [Permutation of Strings](backtracking/permutation-of-strings) +- [Powerset](backtracking/powerset) +- [Rat in maze](backtracking/rat-in-maze) +- [Subset Sum](backtracking/subset-sum) +- [Sudoku Solve](backtracking/sudoku-solve) + +## [Bit Manipulation](bit-manipulation) + +- [Addition using bits](bit-manipulation/adding-using-bits) +- [Bit divisor](bit-manipulation/bit-divisor) +- [Byte swapper](bit-manipulation/byte-swapper) +- [Convert numbers to binary](bit-manipulation/convert-numbers-to-binary) +- [Count set bits](bit-manipulation/count-set-bits) +- [Flip bits](bit-manipulation/flip-bits) +- [Hamming distance](bit-manipulation/hamming-distace) +- [Invert bit](bit-manipulation/invert-bit) +- [Lonely integer](bit-manipulation/lonely-integer) +- [Magic Number](bit-manipulation/magic-number) +- [Maximum XOR Value](bit-manipulation/maximun-xor-value) +- [Power of 2](bit-manipulation/power-of-2) +- [Subset Generation](bit-manipulation/subset-generation) +- [Sum binary numbers](bit-manipulation/sum-binary-numbers) +- [Sum equals XOR](bit-manipulation/sum-equals-xor) +- [Thrice unique number](bit-manipulation/thrice-unique-number) +- [Twice unique number](bit-manipulation/twice-unique-number) +- [XOR Swap](bit-manipulation/xor-swap) + +## [Cellular Automaton](cellular-automaton) + +- [Brians Brain](cellular-automaton/brians-brain) +- [Conways Game of life](cellular-automaton/conways-game-of-life) +- [Elementary Cellular Automata](cellular-automaton/elementary-cellular-automata) +- [Generic Algorithm](cellular-automaton/generic-algorithm) +- [Langtons Ant](cellular-automaton/langtons-ant) +- [Nobili Cellular Automata](cellular-automaton/nobili-cellular-automata) +- [Von Neoumann Cellular Automata](cellular-automaton/von-neoumann-cellular-automata) + +## [Computational Geometry](computational-geometry) + +- [2D Line intersection](computational-geometry/) +- [2D Separating Axis test](computational-geometry/) +- [Area of polygon](computational-geometry/) +- [Area of triangle](computational-geometry/) +- [Axis aligned bounding box collision](computational-geometry/) +- [Bresenham Line](computational-geometry/) +- [Chans Algorithm](computational-geometry/) +- [Cohen Sutherland Lineclip](computational-geometry/) +- [Distance between points](computational-geometry/) +- [Graham Scan](computational-geometry/) +- [Halfplane intersection](computational-geometry/) +- [Jarvis March](computational-geometry/) +- [Quickull](computational-geometry/) +- [Sphere tetrahedron intersection](computational-geometry/) +- [Sutherland Hodgeman clipping](computational-geometry/) + +## [Cryptography](cryptography) + +- [Affine Cipher](cryptography/) +- [Atbash Cipher](cryptography/) +- [Autokey Cipher](cryptography/) +- [Baconian Cipher](cryptography/) +- [Caesar Cipher](cryptography/) +- [Colummnar Cipher](cryptography/) +- [Vigenere Cipher](cryptography/) + +## [Data Structures](data-structures) + +- [Bag](data-structures/bag/) +- [Hashes](data-structures/hashes/) +- [Linked List](data-structures/linked-list/) +- [List](data-structures/list/) +- [Queue](data-structures/queue/) +- [Stack](data-structures/stack/) +- [Tree](data-structures/tree/) -This work is licensed under a [MIT License](https://github.com/abranhe/algorithms/blob/master/LICENSE) +## [Divide and conquer](divide-and-conquer) -[![MIT IMG][mit-license]]((https://github.com/abranhe/algorithms/blob/master/LICENSE)) +- [Strassen Matrix Manipulation](divide-and-conquer/) +- [Closest Pair of Point](divide-and-conquer/) +- [Inversion Count](divide-and-conquer/) +- [Karatsuba Multiplication](divide-and-conquer/) +- [Maximum Contiguous subsequence sum](divide-and-conquer/) +- [Merge Sort using divide and conquer](divide-and-conquer/) +- [Quick Sort using divide and conquer](divide-and-conquer/) +- [Tournament Method to find min max](divide-and-conquer/) +- [Warnock Algorithm](divide-and-conquer/) +- [X Power Y](divide-and-conquer/) -To the extent possible under law, [Carlos Abraham](https://go.abranhe.com/github) has waived all copyright and related or neighboring rights to this work. +## [Dynamic Programming](dynamic-programming) +- [Array Median](dynamic-programming) +- [Optima Binary Search Tree](dynamic-programming) +- [Binomial Coefficient](dynamic-programming) -[mit-license]: https://cdn.abraham.gq/projects/algorithms/mit-license.png +## [Gaming Theory](gaming-theory) + +- [Nim Next Best Move Game](gaming-theory/) +- [Nim Win Loss Game](gaming-theory/) +- [Grundy Numbers Kayle Game](gaming-theory/) + +## [Graphs](graphs) + +- [Bipartite Check](graphs/) +- [Adjacency Lists graphs representation](graphs/) +- [A* (A Star)](https://allalgorithms.com/docs/a-star) + +## [Greedy Algorithms](greedy-algorithms) + +- [Activity Selection](greedy-algorithms) +- [Dijkstra Shortest Path](greedy-algorithms) +- [Egyptian Fraction](greedy-algorithms) + +## [Math](math) + +- [2 Sum](math/) +- [Add Polynomials](math/) +- [Amicable Numbers](math/) +- [Armstrong Numbers](math/) +- [Automorphic Numbers](math/) +- [Average Stream Numbers](math/) +- [Babylonian Method](math/) +- [Binomial Coefficient](math/) +- [Catalan Number](math/) +- [Check is Square](math/) +- [Convolution](math/) +- [Coprime Numbers](math/) +- [Count Digits](math/) +- [Count Trailing Zeroes](math/) +- [Decoding of String](math/) +- [Delannoy Number](math/) +- [Derangements](math/) +- [DFA Division](math/) +- [Diophantine](math/) +- [Divided Differences](math/) +- [Euler Totient](math/) +- [Exponentiation Power](math/) +- [Factorial](math/factorial) +- [Fast Fourier transform](math/) +- [Fast inverse (sqrt) Square Root](math/) + +## [Networking](networking) + +- [Packet Sniffer](networking/) +- [Determine Endianess](networking/) +- [Validate IP](networking/) + +## [Numerical Analysis](numerical-analysis) + +- [Integral](numerical-analysis/integral) +- [Monte Carlo](numerical-analysis/monte-carlo) +- [Runge Kutt](numerical-analysis/runge-kutt) + +## [Operating system](operating-system) + +- [Currency](operating-system/) +- [Deadlocks](operating-system/) +- [Memory Management](operating-system/) +- [Scheduling](operating-system/) +- [Shell](operating-system/) + +## [Randomized Algorithms](randomized-algorithms) + +- [Birthday Paradox](randomized-algorithms) +- [Karger Minimum Cut Algorithm](randomized-algorithms) +- [Kth Smallest Element Algorithm](randomized-algorithms) +- [Random from Stream](randomized-algorithms) +- [Random Node Linked list](randomized-algorithms) +- [Randomized Quicksort](randomized-algorithms) +- [Reservoir Sampling](randomized-algorithms) +- [Shuffle an Array](randomized-algorithms) + +## [Searches](searches) + +- [Binary Search](searches) +- [Exponential Search](searches) +- [Fibonacci Search](searches) +- [Fuzzy Search](searches) +- [Interpolation Search](searches) +- [Jump Search](searches) +- [Linear Search](searches) +- [Ternay Search](searches) + +## [Selections Algorithms](selections-algorithms) + +- [Median of Medians](selections-algorithms) +- [Quick Select](selections-algorithms) + +## [Sorting](sorting) + +- [Bead Sort](sorting/) +- [Bogo Sort](sorting/) +- [Bubble Sort](sorting/) +- [Bucket Sort](sorting/) +- [Circle Sort](sorting/) +- [Comb Sort](sorting/) +- [Counting Sort](sorting/) +- [Cycle Sort](sorting/) +- [Flash Sort](sorting/) +- [Gnome Sort](sorting/) +- [Heap Sort](sorting/) +- [Insertion Sort](sorting/) +- [Intro Sort](sorting/) +- [Median Sort](sorting/) +- [Merge Sort](sorting/) +- [Pipeonhole Sort](sorting/) +- [Quick Sort](sorting/) +- [Radix Sort](sorting/) +- [Selection Sort](sorting/) +- [Shaker Sort](sorting/) +- [Shell Sort](sorting/) +- [Sleep Sort](sorting/) +- [Stooge Sort](sorting/) +- [Topological Sort](sorting/) +- [Tree Sort](sorting/) + +## [Strings](strings) + +- [Aho Corasick Algorithm](strings) +- [Anagram Search](strings) +- [Arithmetic on large numbers](strings) +- [Boyer Moore Algorithm](strings) +- [Finite Automata](strings) +- [Kasai Algorithm](strings) +- [Kmp Algorithm](strings) +- [Levenshteing Distance](strings) +- [Lipogram Checker](strings) + +## [Online Challenges](online-challenges) + +- [Coderbyte](online-challenges/coderbyte) +- [Code Chef](online-challenges/code-chef) +- [Code Eval](online-challenges/code-eval) +- [Hackerearth](online-challenges/hackerearth) +- [Hackerrank](online-challenges/hackerrank) +- [LeetCode](online-challenges/leetcode) +- [Project Euler](online-challenges/project-euler) +- [Rosalind](online-challenges/rosalind) +- [SPOJ](online-challenges/spoj) +- [Top Coder](online-challenges/top-coder)` + +## [Others](others) + +- [Average](others/) +- [Biggest of n numbers](others/) +- [Biggest Suffix](others/) +- [Fifteen Puzzle](others/) +- [Jaccard Similarity](others/) +- [Jose Phus Problem](others/) +- [Lapindrom Checker](others/) +- [Leap Year](others/) +- [Magic Square](others/) +- [Majority Element](others/) +- [Minimum subarray size with degree](others/) +- [No operator addition](others/) +- [Paint fill](others/) +- [Split list](others/) +- [Tokenizer](others/) +- [Unique number](others/) + +## License + +This work is released under MIT License. + +To the extent possible under law, [Abraham Hernandez (@abranhe)](https://go.abranhe.com/github) has waived all copyright and related or neighboring rights to this work. + +
+ + + +
+
\ No newline at end of file diff --git a/src/.gitkeep b/src/.gitkeep new file mode 100644 index 0000000..e69de29 From 988c0c438667317a95c34f7d3899800192dc830e Mon Sep 17 00:00:00 2001 From: Abraham Hernandez Date: Fri, 2 Oct 2020 02:52:32 -0400 Subject: [PATCH 11/11] moving algorithms to /algorithms --- {sorting => algorithms/sorting}/quicksort.f95 | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {sorting => algorithms/sorting}/quicksort.f95 (100%) diff --git a/sorting/quicksort.f95 b/algorithms/sorting/quicksort.f95 similarity index 100% rename from sorting/quicksort.f95 rename to algorithms/sorting/quicksort.f95