Show Changes Show Changes
Print Print
Recent Changes Recent Changes
Subscriptions Subscriptions
Lost and Found Lost and Found
Find References Find References
Rename Rename
Administration Page Administration Page
Search

History

3/1/2006 6:50:39 PM
-68.15.147.130
List all versions List all versions

RSS feed for the FlexWiki namespace

Stable Sort
.

A StableSort preserves the order of records which have equal keys. For example, given the following unsorted records:

Sort Key Value
Q 1
B 3
Y 2
Y 1
D 1
B 2
B 1
R 1

A stable sort will result in the following:

Sort Key Value
B 3
B 2
B 1
D 1
Q 1
R 1
Y 2
Y 1

Notice the the records with duplicate keys, the "B" records and "Y" records, stay in the same relative order: B3, B2, B1 and Y2, Y1. This is stability. If the order of the "B" or "Y" records were to change, say to B2, B1, B3 and Y1, Y2, then the sort would be unstable.

Currently, FlexWiki's sort is unstable.

-- ScottAinsworth [2006-03-01]

Not logged in. Log in

Welcome to the home of FlexWiki, a collaboration tool, based on WikiWiki, implemented using Microsoft .NET technologies

This is FlexWiki, an open source wiki engine.

This site supports the new NoFollow anti-spam initiative.
Change Style

Recent Topics