Add a stalin sort algorithm in any language you like ❣️ if you like give us a ⭐️

Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|

Javascript Algorithms | 165,436 | 2 | 5 days ago | 4 | June 02, 2018 | 294 | mit | JavaScript | ||

📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings | ||||||||||

Python | 156,086 | 15 hours ago | 146 | mit | Python | |||||

All Algorithms implemented in Python | ||||||||||

Java | 50,905 | 19 hours ago | 17 | mit | Java | |||||

All Algorithms implemented in Java | ||||||||||

Javascript | 25,805 | 8 days ago | 32 | gpl-3.0 | JavaScript | |||||

Algorithms and Data Structures implemented in JavaScript for beginners, following best practices. | ||||||||||

C Plus Plus | 23,758 | 12 hours ago | 41 | mit | C++ | |||||

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes. | ||||||||||

Algorithms | 22,274 | 14 | 1 | 18 days ago | 5 | October 04, 2020 | 200 | mit | Python | |

Minimal examples of data structures and algorithms in Python | ||||||||||

C | 15,880 | 12 hours ago | 24 | gpl-3.0 | C | |||||

Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes. | ||||||||||

Tech Interview For Developer | 10,098 | 3 days ago | 2 | mit | Java | |||||

👶🏻 신입 개발자 전공 지식 & 기술 면접 백과사전 📖 | ||||||||||

Algoxy | 5,568 | 14 hours ago | 2 | TeX | ||||||

Book of Elementary Algorithms and Data structures | ||||||||||

C Sharp Algorithms | 5,068 | 6 months ago | 1 | August 14, 2021 | 47 | mit | C# | |||

:books: :chart_with_upwards_trend: Plug-and-play class-library project of standard Data Structures and Algorithms in C# |

Alternatives To Stalin SortSelect To Compare

Alternative Project Comparisons

Readme

Stalin Sort is an efficient sorting algorithm, serving as a systematic method for placing the elements of a random access file or an array in order. Stalin Sort is also know as the best sorting algorithm of all times because of its AMAZING capacity of always ordering an array with an O(n) performance.

It's simple, all you need to do is iterate through the array, checking if its elements are in order. Any element that isn't in order you pull out, in other words, you send it to Gulag.

- (1 2 5 3 5 7) -> (
**1**2 5 3 5 7) Here the algorithm stores the first of element of the array - (
**1**2 5 3 5 7) -> (1**2**5 3 5 7) Now it will compare the stored element with the second one, if this is bigger than the stored, it replaces the stored element by this - (1
**2**5 3 5 7) -> (1 2**5**3 5 7) Repeats step 2 - (1 2
**5**3 5 7) -> (1 2**5**5 7) Since the 4th element is smaller than the 3rd one, the 4th element will be eliminated. - (1 2
**5**5 7) -> (1 2 5**5**7) Equal elements are preserved -
**(1 2 5 5 7)**Ordered array!

Keep in mind that this is pseudocode, and is just an example. We strongly encourage you to code a different approach.

```
FUNCTION stalinSort(A : list OF sortable items)
n := length(A)
bigger := 0
B SET empty list
FOR i := 0 TO n NOT inclusive DO
IF A[i] >= bigger THEN
bigger := A[i]
B.push(A[i])
END IF
END FOR
RETURN B
END FUNCTION
```

Please check the CONTRIBUTING.md

Stalin sort began first as a Hacktoberfest 2018 repo

Hacktoberfest is a program organised by Digital Ocean and Github, where you can easily win a T-Shirt just by making 5 pull requests in the month of October to any open source projects on Github.

Popular Algorithms Projects

Popular Sort Projects

Popular Computer Science Categories

Related Searches

Get A Weekly Email With Trending Projects For These Categories

No Spam. Unsubscribe easily at any time.

Algorithms

Sort

Coq