gustavo-depaula / stalin-sort Goto Github PK
View Code? Open in Web Editor NEWAdd a stalin sort algorithm in any language you like ❣️ if you like give us a ⭐️
License: MIT License
Add a stalin sort algorithm in any language you like ❣️ if you like give us a ⭐️
License: MIT License
I wonder how other sorting algorithms like: TrumpSort, PutinSort, BidenSort will look like? ))
I propose addition of a new sorting algorithm which combines the best features of both stalinsort and bogosort.
The algorithm is fairly simple:
Just randomly remove elements until the array is in order.
Complexity ranges from O(n)
to O(n²)
Hope this will make the world a better place!
It gives unsorted array on input 1,5,2,4
As this project gets larger and larger, lol, we may need a less vague algorithm definition than a tweet so that it is easier to know if a PR is wrong.
Example
Additional steps:
5. Try sort other containers with LeninSort
6. Merge all first containers
7. You can sort merged container with StalinSort
It seems like you have implemented StalinSort in more than 30 languages. But have the source codes been peer reviewed enough so that they only contain generic template classes that permits the development of general programs, and do not depend on the underlying container.
I really like this idea because it avoids function overhead and pays strict attention to time complexity of algorithm (always O(N)
). But I hope this repository actually provide a structured generic components that can actually be used in a seamless way.
Any element which is out of order is eliminated
The 50 is the asshole here, why did the others have to die? Whyyy god whyy?
I belive that would be good to have a folder with some default inputs and outputs, so anyone that wants to add some solution in any given language must post with it the outputs of his code too, its kind important to have some sort of validation to the added codes.
My idea is to create a folder with numbered folders in it, related to the number of the test, so if exists 20 tests, the folder tests will contain 20 folders numbered from 1 to 20.
stalin-sort/tests/1...20
In each of this folders will exist 2 .txt files, one called input and other one called output. This files will contain numbers with pipes ( | ) between them.
input.txt
1|2|3|4|5|2
output.txt
1|2|3|4|5
:)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.