https://github.com/ppmpreetham/typewriter-sort
A Unique Sorting Algorithm
https://github.com/ppmpreetham/typewriter-sort
Last synced: 2 months ago
JSON representation
A Unique Sorting Algorithm
- Host: GitHub
- URL: https://github.com/ppmpreetham/typewriter-sort
- Owner: ppmpreetham
- License: other
- Created: 2023-12-31T15:21:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-06T05:25:52.000Z (over 1 year ago)
- Last Synced: 2025-02-01T15:46:03.652Z (4 months ago)
- Language: Rust
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# typewriter-sort
A sorting algorithm has a time complexity of $`O(n)`$ and in the worst case, it has a time complexity of $`O( \infty )`$.
Yes, it's worse than Bogosort, Bozosort and Bogobogosort.The algorithm was made as a joke on a search to make the worst algorithm of all time.
The usage of two ```while``` loops makes it impossible to give the desired output in time.## Usage
### Python```python
import {typewriter_sort} from '@Preetham-ai/typewriter-sort'
test_array = [7,5,338,46,21,2,9]
print(typewriter_sort(test_array))
```### Rust
```rust
fn main() {
let test_array = vec![7,5,338,46,21,2,9];
let result = typewriter_sort(&test_array);
println!("{:?}", result);
}
```