deletionsort

0.0.12 • Public • Published

DeletionSort

"Why sort when you can just delete?" - A wise person, probably

Deletion sort is a revolutionary algorithm that solves the age-old problem of sorting with a simple, yet brutal approach: just delete everything and call it a day! It's the programming equivalent of "if it doesn't work, just turn it off and back on again."

Features

  • Runs in a blistering O(1) time complexity! (Because it doesn't actually sort anything)
  • Guaranteed to produce an empty (and therefore sorted) array or table every time!
  • Saves you the hassle of writing complex sorting logic.
  • Frees up disk space by deleting your precious data.
  • Provides a great excuse for losing all your work: "Oops, I ran the deletionsort algorithm!"

Installation

Python

to use in Python run this in your local terminal:

pip install deletionSort

to use in JavaScript run this in your local terminal:

Node / Javascript

npm i deletionsort

Usage

python

original_data = [3, 1, 4, 1, 5, 9]
print("Original data:", original_data)

khalas(original_data)
print("Sorted data:", original_data)  # Output: Sorted data: []

JavaScript

const khalas = require('deletionsort')

let array = [1,3,4,6,7,];
console.log(khalas(array));

SQL

-- SQL
DROP TABLE employees;  -- Goodbye, employee records!

Warning

Use at your own risk! While the deletionsort algorithm is incredibly efficient, it may lead to undesirable side effects, such as:

> Loss of important data
> Getting fired from your job
> Angry customers or coworkers
> Existential dread

We recommend using this algorithm only for educational purposes or when you really, really don't like your data. Contributing

If you have any ideas for improving the deletionsort algorithm, such as adding more delete options or implementing a "shred" feature, feel free to open a pull request! We're always looking for ways to make data deletion even more efficient and destructive.

Happy sorting (or should we say, deleting)!

Package Sidebar

Install

npm i deletionsort

Weekly Downloads

0

Version

0.0.12

License

ISC

Unpacked Size

2.75 kB

Total Files

3

Last publish

Collaborators

  • hashimalmuqbel