Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Redpill me on sorting algorithms

Name: Anonymous 2018-06-23 15:58

What is the most redpilled sorting algorithm?

Name: Anonymous 2018-06-23 16:04

The fundamental nature of algorithms is beyond the pretty notions of redpilled or woke.

Name: Anonymous 2018-06-23 16:33

Radix Sort

Name: Anonymous 2018-06-23 16:40

An American flag sort is an efficient, in-place variant of radix sort that distributes items into buckets. Non-comparative sorting algorithms such as radix sort and American flag sort are typically used to sort large objects such as strings, for which comparison is not a unit-time operation.[1] American flag sort iterates through the bits of the objects, considering several bits of each object at a time. For each set of bits, American flag sort makes two passes through the array of objects: first to count the number of objects that will fall in each bin, and second to place each object in its bucket. This works especially well when sorting a byte at a time, using 256 buckets. With some optimizations, it is twice as fast as quicksort for large sets of strings.[1]

Name: Anonymous 2018-06-23 17:33

sleep sort and/or quantum bogosort

Name: Anonymous 2018-06-23 19:47

Marxism sorting: elements sort themselves out based on class struggle concept.

Name: Anonymous 2018-06-23 20:28

\(\forall x \in IN.\ OUT_x = x\)

Name: Anonymous 2018-06-23 21:43

>>7
my math is rusty
there exists x for all input, output of x = x?
so basically it doesn't sort shit?

Name: Anonymous 2018-06-24 12:49

>>8
forall x in IN:
OUT[x] = x


Assuming that the rest of OUT has a value of null or whatever.

Name: Anonymous 2018-06-28 18:46

>>9
This might require too much memory, if one of the x's is for instance 2^31-1, but there are only 5 numbers to sort.

Name: Anonymous 2018-06-28 20:21

>>10
It only needs \(O(n)\) time however.

Name: Anonymous 2018-06-28 23:47

out[x] += 1;

Name: Anonymous 2018-06-29 1:57

out[x]++;

Name: Anonymous 2018-06-29 4:17

They separated men from the women, and then we had to go through a line and an officer would go like this, left or right. If you went to left you went to your death. If you went to right you went to work.
https://www.ushmm.org/information/visit-the-museum/programs-activities/first-person-program/first-person-podcast/martin-weiss-selection-at-auschwitz

Name: Anonymous 2018-06-29 8:32

>>14
How can I implement this

Name: Anonymous 2018-06-29 20:23

>>15
Seems similar to a single iteration of quicksort.

Name: Anonymous 2018-07-02 12:52

Searching and sorting algorithms are interesting.

Linear search: starts from the beginning of a list and then iterates over every element until the item being searched for is found, or until it reaches the end of the list.

Binary search: starts by searching in the middle, then goes one of two ways -- either the middle in the first half, or the middle in the second half. Keeps doing this until the proper item is found. Much faster than linear search, but it assumes the list is sorted and directly accessible (such as an array as opposed to a linked list)

Big O notation can be used to express how efficient or inefficient a sorting algorithm is -- for best case, average case, and worst case. Big O notation describes how a function behaves relative to the size of its input.

With all this talk of sorting algorithms, what exactly is sorting? Sorting is the process of converting a list of elements (which can be in any random order) into ascending or descending order. The problem with sorting is that a program can't see the entire list at the same time to know where to move an element, so we need to use simpler algorithms.

Selection sort: this is a sorting algorithm that puts the input into two categories: the sorted and unsorted parts. For every iteration, it changes the index of the smallest and swaps the leftmost unsorted with the smallest. One swap per iteration over the input.

Insertion sort: like selection sort, it has the sorted and unsorted portions. But it repeatedly inserts the next value from the unsorted part into the correct location in the sorted part. Multiple swaps and comparisons are made for each full iteration over the list.

Quicksort uses partitioning and a pivot value.

Merge sort

radix sort

sleep deprivation

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List