The fundamental nature of algorithms is beyond the pretty notions of redpilled or woke.
Name:
Anonymous2018-06-23 16:33
Radix Sort
Name:
Anonymous2018-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:
Anonymous2018-06-23 17:33
sleep sort and/or quantum bogosort
Name:
Anonymous2018-06-23 19:47
Marxism sorting: elements sort themselves out based on class struggle concept.
Name:
Anonymous2018-06-23 20:28
\(\forall x \in IN.\ OUT_x = x\)
Name:
Anonymous2018-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?
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.
>>15 Seems similar to a single iteration of quicksort.
Name:
Anonymous2018-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.