An open API service indexing awesome lists of open source software.

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

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);
}
```