Rumrunner0.Bozosort
0.1.0
Prefix Reserved
dotnet add package Rumrunner0.Bozosort --version 0.1.0
NuGet\Install-Package Rumrunner0.Bozosort -Version 0.1.0
<PackageReference Include="Rumrunner0.Bozosort" Version="0.1.0" />
<PackageVersion Include="Rumrunner0.Bozosort" Version="0.1.0" />
<PackageReference Include="Rumrunner0.Bozosort" />
paket add Rumrunner0.Bozosort --version 0.1.0
#r "nuget: Rumrunner0.Bozosort, 0.1.0"
#:package Rumrunner0.Bozosort@0.1.0
#addin nuget:?package=Rumrunner0.Bozosort&version=0.1.0
#tool nuget:?package=Rumrunner0.Bozosort&version=0.1.0
bozosort
Implementation of the Bozosort sorting algorithm.
This repository contains the Rumrunner0.Bozosort class library and Rumrunner0.Bozosort.Demo.Runnable console application. All the content in the repository is an original work created as a personal project, and serves as a .NET C# adaptation of the infamous bozosort algorithm.
Description
The Rumrunner0.Bozosort is a .NET C# implementation of Bozosort — a highly inefficient sorting algorithm that operates by repeatedly selecting two elements of the list at random and swapping them if they are in the wrong order. This process continues until the entire list is sorted. Due to its random nature, Bozosort has an unbounded worst-case time complexity, and is typically used as a humorous example of how not to design an algorithm.
The Rumrunner0.Bozosort.Demo.Runnable is a console application demonstrating the usage of the Rumrunner0.Bozosort library.
Usage
WARNING: The
Rumrunner0.Bozosortlibrary is NOT intended for use in any real-world, production-level software. It is highly inefficient and is provided here for educational and entertainment purposes only.
Rumrunner0.Bozosort Library
using System;
using Rumrunner0.Bozosort;
// A Bozosorter instance is created to perform the sorting.
var sorter = new Bozosorter<int>();
var collection = (int[])[ 3, 2, 4, 1, 5 ];
// Events can be utilized to gain insight into the stage of the sorting process.
sorter.Started += (_, args) => Console.WriteLine("Sorting has been started.");
sorter.Completed += (_, args) => Console.WriteLine("Sorting has been completed.");
// Event arguments can be utilized to enrich debugging with extra details.
sorter.IterationCompleted += (_, args) => Console.WriteLine
(
$"Iteration {args.Iteration}. " +
$"Change {args.FirstItem} <=> {args.SecondItem}. " +
$"Collection {string.Join(separator: " ", args.Collection)}."
);
// Method Run() is called to start the sorting process.
sorter.Run(collection);
Rumrunner0.Bozosort.Demo.Runnable Console Application
After building the solution, run the Rumrunner0.Bozosort.Demo.Runnable console application. It demonstrates a more detailed usage of the Rumrunner0.Bozosort library.
History
The original creator of the bozosort algorithm isn't definitively known, as it's more of a concept used to illustrate an inefficient sorting method rather than a formally recognized algorithm.
Contributing
If you have any suggestions, ideas, or feedback to enhance the project, please feel free to create an issue. Your collaboration is welcomed to make this project a bit better.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 273 | 1/3/2024 |