Sorting algorithms

Spreadsort

Spreadsort is a sorting algorithm invented by Steven J. Ross in 2002. It combines concepts from distribution-based sorts, such as radix sort and bucket sort, with partitioning concepts from comparison sorts such as quicksort and mergesort. In experimental results it was shown to be highly efficient, often outperforming traditional algorithms such as quicksort, particularly on distributions exhibiting structure and string sorting. There is an open-source implementation with performance analysis and benchmarks, and HTML documentation. Quicksort identifies a pivot element in the list and then partitions the list into two sublists, those elements less than the pivot and those greater than the pivot. Spreadsort generalizes this idea by partitioning the list into n/c partitions at each step, where n is the total number of elements in the list and c is a small constant (in practice usually between 4 and 8 when comparisons are slow, or much larger in situations where they are fast). It uses distribution-based techniques to accomplish this, first locating the minimum and maximum value in the list, and then dividing the region between them into n/c equal-sized bins.Where caching is an issue, it can help to have a maximum number of bins in each recursive division step, causing this division process to take multiple steps. Though this causes more iterations, it reduces cache misses and can make the algorithm run faster overall. In the case where the number of bins is at least the number of elements, spreadsort degenerates to bucket sort and the sort completes. Otherwise, each bin is sorted recursively. The algorithm uses heuristic tests to determine whether each bin would be more efficiently sorted by spreadsort or some other classical sort algorithm, then recursively sorts the bin. Like other distribution-based sorts, spreadsort has the weakness that the programmer is required to provide a means of converting each element into a numeric key, for the purpose of identifying which bin it falls in. Although it is possible to do this for arbitrary-length elements such as strings by considering each element to be followed by an infinite number of minimum values, and indeed for any datatype possessing a total order, this can be more difficult to implement correctly than a simple comparison function, especially on complex structures. Poor implementation of this value function can result in clustering that harms the algorithm's relative performance. (Wikipedia).

Video thumbnail

What is a Put Spread? | Options Trading Strategies | Option Combinations

What is a Put Spread? - Options Trading Strategies These classes are all based on the book Trading and Pricing Financial Derivatives, available on Amazon at this link. https://amzn.to/2WIoAL0 Check out our website http://www.onfinance.org/ Follow Patrick on twitter here: https://twitte

From playlist Class 2: An Introduction to Options

Video thumbnail

What is a Call Spread? Financial Options - Financial Derivatives

What is an options call spread? These classes are all based on the book Trading and Pricing Financial Derivatives, available on Amazon at this link. https://amzn.to/2WIoAL0 Check out our website http://www.onfinance.org/ Follow Patrick on twitter here: https://twitter.com/PatrickEBoyle

From playlist Class 2: An Introduction to Options

Video thumbnail

What is a Butterfly Spread?

What is a Butterfly Spread? - Options Trading Strategies Explained These classes are all based on the book Trading and Pricing Financial Derivatives, available on Amazon at this link. https://amzn.to/2WIoAL0 Check out our website http://www.onfinance.org/ Follow Patrick on twitter here:

From playlist Class 2: An Introduction to Options

Video thumbnail

Spreads, determinants and chromogeometry (I) | WildTrig: Intro to Rational Trigonometry

We give a review of some formulas for the spread between two lines, and rewrite some of them using vector language and the theory of determinants. We get the important understanding that a spread between two vectors is just a renormalization of the squared area of the parallelogram spanned

From playlist WildTrig: Intro to Rational Trigonometry

Video thumbnail

Credit Spread Options (Put & Call)

A credit spread option is a hedge/bet on the narrowing or widening of a credit spread (credit spread = risky yield - riskless yield). The credit spread put payoff = duration x notional x MAX [Credit Spread - Strike Spread, 0]. The Credit spread call payoff = duration x notional x MAX [Stri

From playlist Derivatives: Credit Derivatives

Video thumbnail

Linear Algebra, Vector Calculus and Other stuff Stream! =D

Support the channel by skigning up on Brilliant for FREE using the link https://brilliant.org/FlammableMaths ! =D Help me create more free content! =) https://www.patreon.com/mathable Merch :v - https://teespring.com/stores/papaflammy https://www.amazon.com/shop/flamma

From playlist Livestreams

Video thumbnail

Expanding Logarithms

Watch more videos on http://www.brightstorm.com/math/algebra-2 SUBSCRIBE FOR All OUR VIDEOS! https://www.youtube.com/subscription_center?add_user=brightstorm2 VISIT BRIGHTSTORM.com FOR TONS OF VIDEO TUTORIALS AND OTHER FEATURES! http://www.brightstorm.com/ LET'S CONNECT! Facebook ► http

From playlist Algebra II

Video thumbnail

Drawing and Interpreting Heatmaps

This StatQuest is about the heatmaps. We see these all the time, but there are lots of arbitrary decisions that go into drawing them. Here, I show you what those decisions are and how they affect the results. For a complete index of all the StatQuest videos, check out: https://statquest.

From playlist StatQuest

Video thumbnail

The Spread law in Universal Hyperbolic Geometry | Universal Hyperbolic Geometry 27 | NJ Wildberger

The spread between two lines in hyperbolic geometry is exactly dual to the notion of the quadrance between two points. The Spread law is the third of the four main laws of trigonometry in universal hyperbolic geometry. Its proof also relies on a remarkable polynomial identity, just as did

From playlist Universal Hyperbolic Geometry

Video thumbnail

Measures of Spread (1 of 2: Range & IQR)

More resources available at www.misterwootube.com

From playlist Data Analysis

Related pages

Flashsort | Total order | Sorting algorithm | Introsort | Probability density function | Bucket sort | Quicksort | Radix sort