Bucketsort

From Algowiki
Revision as of 21:35, 2 October 2014 by Jhohmann (talk | contribs)
Jump to navigation Jump to search

General information

Algorithmic problem: Sorting sequences of strings

Type of algorithm: loop

Axiliary data:

  1. An ordered sequence [math]\displaystyle{ S' }[/math] of strings, which will eventually hold the overall result of the algorithm.
  2. The buckets, that is, an array [math]\displaystyle{ B }[/math] whose index range contains the ID range of [math]\displaystyle{ \Sigma }[/math] (e.g. 26 for the alphabet) and whose components are ordered sequences of strings.
  3. Let [math]\displaystyle{ N }[/math] denote the maximum length of an input string.
  4. An array [math]\displaystyle{ A }[/math] with index range [math]\displaystyle{ [1,\dots,N] }[/math] and multisets of strings as components.

Abstract view

Induction basis

Induction step

Complexity