Jump to content

Sorting Problem

From Encyclopedia of Algorithms
Revision as of 18:39, 3 August 2026 by Aitzaz (talk | contribs) (Initial text on sorting problem.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This article is a stub. It might be missing pseudocode, complexity analysis, or a correctness sketch. It might need some other information which is incomplete perhaps.

The sorting problem is aimed at taking a numerically unordered list of sequence, and reordering this sequence into an ascended or descended sequence of order.

Input: A sequence of $n$ numbers $<a_1,a_2,a_3 \cdots a_n>$

Output: A permutated reordering $<a_1^`, a_2^`,a_3^` \cdots a_n^`>$ so that $<a_1^` \geq a_2^` \geqa_3^` \cdots \geq a_n^`>$ or $<a_1^` \leq a_2^` \leq a_3^` \cdots \leq a_n^`>$