Programming Search⌘K

Conceptcore

Stable sort

Also called stable sorting, sort stability, stable sorting algorithm, unstable sort, order-preserving sort, multi-pass sort, sort by several keys.

A stable sort keeps items with equal keys in the order that they had before the sort. Stability lets a program sort by several keys in several passes, and it makes the result predictable.

Applies to
core-languages

Idea

Two items can have the same sort key but still be different items. Two people can be in the same team, and two orders can have the same date. A sort must put such items next to each other, but it can put them in either order. A stable sort keeps them in the order that they had in the input. An unstable sort can put them in any order. The Python documentation says: "A sort is stable if it guarantees not to change the relative order of elements that compare equal"1.

# The people are in order of name.
people = [("ann", "ops"), ("bob", "dev"), ("cy", "ops"), ("di", "dev"), ("ed", "ops")]

# A stable sort by team keeps the name order inside each team.
by_team = sorted(people, key=lambda p: p[1])
for name, team in by_team:
    print(team, name)
Output
dev bob
dev di
ops ann
ops cy
ops ed

The input is in order of name. The sort compares only the team, so ann, cy and ed are equal for the sort, and bob and di are equal too. Python sorts are stable, so each team keeps the name order of the input. An unstable sort could give ops ed before ops ann.

How it works

What stability means. A sort compares keys, not whole items. When the keys of two items are equal, the sort has no reason to put one item first. A stable sort uses the input position as the last tie-breaker. The Python HOWTO says: "Sorts are guaranteed to be stable. That means that when multiple records have the same key, their original order is preserved"2. Stability matters only when equal keys can belong to items that the program can tell apart. A sort of plain integers gives the same result in both cases, because two equal integers are the same value.

Sorting by several keys in passes. A stable sort lets a program sort by several keys, one key at a time. Sort by the least important key first, and by the most important key last. Each stable pass keeps the order of the passes before it inside each group of equal keys. The Python HOWTO says: "This wonderful property lets you build complex sorts in a series of sorting steps"2. The passes can have different directions, for example a descending grade inside an ascending team. One pass with a compound key, for example a tuple or a chained comparator, gives the same order. See comparator.

Making any sort stable. An unstable sort gives a stable result when no two keys are equal. Add the original position of each item as the last part of the key: two items never have the same position, so the sort has no ties. C qsort does not promise stability: "If comp indicates two elements as equivalent, their order in the resulting sorted array is unspecified"3. A C program can store the position in each record and compare it last.

Algorithms. Merge sort, insertion sort and Timsort are stable when they are written in the usual way. Quicksort, heapsort and introsort are not stable. A stable merge needs a buffer, and this is the main cost of stability. CPython uses Timsort, which its author describes as "an adaptive, stable, natural mergesort"4. Java sorts arrays of objects with a stable merge sort, and it sorts arrays of primitive values with a quicksort, because stability does not matter for them: "The sorting algorithm is a Dual-Pivot Quicksort by Vladimir Yaroslavskiy, Jon Bentley, and Joshua Bloch"5.

What the libraries promise. The documentation of each sort states whether it is stable. A sort that does not promise stability can still give a stable result on one input, so a test does not prove that a sort is stable.

Library Stable Not stable
Python list.sort, sorted none
JavaScript sort, toSorted none
Java List.sort, Collections.sort, Arrays.sort on objects, Stream.sorted on an ordered stream Arrays.sort on primitives, where it does not matter
C# LINQ OrderBy, ThenBy List<T>.Sort, Array.Sort
Go slices.SortStableFunc, sort.Stable, sort.SliceStable slices.Sort, slices.SortFunc, sort.Sort, sort.Slice
Rust sort, sort_by, sort_by_key sort_unstable, sort_unstable_by, sort_unstable_by_key
C++ std::stable_sort, std::list::sort std::sort
C none qsort
Kotlin sortWith, sortedBy, sortedWith none
Haskell sort, sortBy, sortOn none

Python says that "The sort() method is guaranteed to be stable"1. The ECMAScript specification defines the result of sort as a permutation and ends with "i.e., the sort is stable"6, and MDN says that "the specification dictates that Array.prototype.sort is stable"7. Java Arrays.sort on objects says: "This sort is guaranteed to be stable: equal elements will not be reordered as a result of the sort"5, and List.sort says: "The sort is stable: this method must not reorder equal elements"8. C# List<T>.Sort "performs an unstable sort; that is, if two elements are equal, their order might not be preserved"9, and Array.Sort has the same remark10. LINQ OrderBy "performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved"11. Go sort.Slice says: "The sort is not guaranteed to be stable: equal elements may be reversed from their original order. For a stable sort, use SliceStable"12, and slices.SortStableFunc "sorts the slice x while keeping the original order of equal elements"13. Rust sort is "stable (i.e., does not reorder equal elements)", and sort_unstable is "unstable (i.e., may reorder equal elements), in-place (i.e., does not allocate)"14. For C++ std::stable_sort, "The order of equivalent elements is guaranteed to be preserved"15, and for std::sort, "The order of equivalent elements is not guaranteed to be preserved"16. Kotlin says of sortWith and sortedWith: "The sort is stable. It means that equal elements preserve their order relative to each other after sorting"1718. A Java stream sort is stable only on an ordered stream: "For ordered streams, the sort is stable"19. C++ std::list::sort "preserves the order of equivalent elements"20. Haskell says: "The sort function implements a stable sorting algorithm"21.

In languages

LanguageVerdictNote
PythonNative
C++Native
JavaNative
CIdiom
C#Native
JavaScriptNative
TypeScriptNativeTypeScript uses the JavaScript methods sort and toSorted, and the language specification requires them to be stable. No example file exists.
GoNative
RustNative
KotlinNativeThe Kotlin functions sortWith, sortedWith and sortedBy are stable, so equal items keep their order. No example file exists because kotlinc is not installed.
SQLIdiomORDER BY has no stable form, because a table has no input order. A query adds a unique column, for example the primary key, as the last sort key, so no two rows are equal. No example file exists.
BashNativeThe sort command of GNU coreutils has the option -s, which turns off the last-resort comparison of whole lines, so lines with equal keys keep their input order. No example file exists.
PowerShellNativeSort-Object has the switch -Stable. With it, objects with equal sort criteria come out in the order in which Sort-Object received them. No example file exists because pwsh is not installed.
HTMLDoes not applyHTML is markup. It has no operation that sorts values.
CSSDoes not applyCSS has no sort operation. Flex and grid items with the same order value keep their document order, but this is a layout rule and not a sort of data.
Regular expressionsDoes not applyA regular expression matches text. It does not sort values.
Language Verdict Mechanism
Python native list.sort and sorted are always stable, also with reverse=True
JavaScript native sort and toSorted are stable by the language specification
TypeScript native the JavaScript methods
Java native List.sort, Collections.sort and Arrays.sort on objects are stable
Kotlin native sortWith, sortedBy and sortedWith are stable
C# native LINQ OrderBy and ThenBy are stable; List<T>.Sort and Array.Sort are not
Go native slices.SortStableFunc and sort.SliceStable are stable; slices.Sort and sort.Slice are not
Rust native sort, sort_by and sort_by_key are stable; the sort_unstable methods are not
C idiom qsort is not stable; a program adds the original position as the last key
C++ native std::stable_sort is stable; std::sort is not
Bash native the sort command has the option -s for a stable sort
PowerShell native Sort-Object has the switch -Stable22
SQL idiom ORDER BY has no stable form; a query adds a unique column as the last key
Regex n/a a pattern does not sort values
HTML n/a markup does not sort values
CSS n/a the style rules do not sort values

Most languages have a stable sort in the library, and some of them also have a faster unstable sort. C and SQL have no stable sort, so a program makes the order of equal keys explicit with one more key.

The example files show these differences. Python shows two passes, a tuple key, the stability of reverse=True, and reversed(), which also reverses the equal items. JavaScript shows two passes and a chained compare function. Java shows List.sort, two passes, a stream sort and a reversed comparator on an array. C# shows the stable LINQ OrderBy and an index that makes List<T>.Sort stable. Go shows SortStableFunc, SliceStable and a full key for SortFunc. Rust shows sort_by_key and an index key for sort_unstable_by_key. C shows an index key for qsort. C++ shows std::ranges::stable_sort with projections and a full key for std::ranges::sort.

PythonGitHub
from operator import itemgetter

staff = [("ann", "ops", 3), ("bob", "dev", 2), ("cy", "ops", 2), ("di", "dev", 3), ("ed", "ops", 2)]

# Two passes: sort by the second key first, then by the first key.
# The stable second pass keeps the grade order inside each team.
s = sorted(staff, key=itemgetter(2))
s = sorted(s, key=itemgetter(1))
print([n for n, _, _ in s])

# One pass with a tuple key gives the same order.
print([n for n, _, _ in sorted(staff, key=itemgetter(1, 2))])

# reverse=True keeps equal items in their old order; it does not reverse them.
print([n for n, _, _ in sorted(staff, key=itemgetter(1), reverse=True)])

# Reversing the result of an ascending sort also reverses the equal items.
print([n for n, _, _ in reversed(sorted(staff, key=itemgetter(1)))])

# Several passes can use different directions: grade descending, then team ascending.
s = sorted(staff, key=itemgetter(2), reverse=True)
s = sorted(s, key=itemgetter(1))
print([(n, g) for n, _, g in s])
Output
['bob', 'di', 'cy', 'ed', 'ann']
['bob', 'di', 'cy', 'ed', 'ann']
['ann', 'cy', 'ed', 'bob', 'di']
['ed', 'cy', 'ann', 'di', 'bob']
[('di', 3), ('bob', 2), ('ann', 3), ('cy', 2), ('ed', 2)]
  • Verdict: native. Two stable passes, grade first and team last, give the same order as the tuple key (team, grade). reverse=True puts ops first and keeps ann, cy and ed in their input order. reversed() on an ascending sort gives the teams in the same order but reverses the equal items to ed, cy, ann. The last two passes sort by grade in descending order inside each ascending team.
#include <algorithm>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>

struct Staff {
    std::string name, team;
    int grade;
};

static void show(const std::vector<Staff> &v) {
    for (const auto &p : v) std::cout << p.name << ' ';
    std::cout << '\n';
}

int main() {
    const std::vector<Staff> all{{"ann", "ops", 3}, {"bob", "dev", 2}, {"cy", "ops", 2}, {"di", "dev", 3}, {"ed", "ops", 2}};

    // std::stable_sort keeps equal teams in the name order.
    auto s = all;
    std::ranges::stable_sort(s, {}, &Staff::team);
    show(s);

    // Two stable passes: grade first, then team.
    s = all;
    std::ranges::stable_sort(s, {}, &Staff::grade);
    std::ranges::stable_sort(s, {}, &Staff::team);
    show(s);

    // std::sort is not stable. A comparator on every field leaves no ties.
    s = all;
    std::ranges::sort(s, [](const Staff &a, const Staff &b) {
        return std::tie(a.team, a.grade, a.name) < std::tie(b.team, b.grade, b.name);
    });
    show(s);
}
Output
bob di ann cy ed
bob di cy ed ann
bob di cy ed ann
  • Verdict: native. std::ranges::stable_sort with the projection &Staff::team keeps the name order inside each team. Two stable passes sort by team and then by grade. std::ranges::sort is not stable, so its comparator uses std::tie on every field.
JavaGitHub
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

public class Main {
    record Staff(String name, String team, int grade) {}

    static List<String> names(List<Staff> s) {
        return s.stream().map(Staff::name).toList();
    }

    public static void main(String[] args) {
        List<Staff> staff = List.of(
                new Staff("ann", "ops", 3), new Staff("bob", "dev", 2), new Staff("cy", "ops", 2),
                new Staff("di", "dev", 3), new Staff("ed", "ops", 2));

        // List.sort is stable: equal teams keep the name order.
        List<Staff> s = new ArrayList<>(staff);
        s.sort(Comparator.comparing(Staff::team));
        System.out.println(names(s));

        // Two stable passes: grade first, then team.
        s = new ArrayList<>(staff);
        s.sort(Comparator.comparingInt(Staff::grade));
        s.sort(Comparator.comparing(Staff::team));
        System.out.println(names(s));

        // A stream sort is stable too, because the stream is ordered.
        System.out.println(names(staff.stream()
                .sorted(Comparator.comparing(Staff::team).thenComparingInt(Staff::grade)).toList()));

        // Arrays.sort on an Object[] is stable; on an int[] stability does not matter,
        // because equal ints cannot be told apart.
        Staff[] arr = staff.toArray(new Staff[0]);
        Arrays.sort(arr, Comparator.comparingInt(Staff::grade).reversed());
        System.out.println(names(Arrays.asList(arr)));
    }
}
Output
[bob, di, ann, cy, ed]
[bob, di, cy, ed, ann]
[bob, di, cy, ed, ann]
[ann, di, bob, cy, ed]
  • Verdict: native. List.sort keeps the name order inside each team. Two passes give the same order as comparing(team).thenComparingInt(grade) on a stream. Arrays.sort on an object array is stable, so the reversed grade comparator puts ann and di first in their input order, and then bob, cy and ed.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

struct staff {
    const char *name;
    const char *team;
    size_t pos; /* the original position, used to break ties */
};

/* qsort does not promise a stable sort, so the comparator uses pos when the teams are equal. */
static int by_team_then_pos(const void *a, const void *b) {
    const struct staff *x = a, *y = b;
    int c = strcmp(x->team, y->team);
    if (c != 0) return c;
    return (x->pos > y->pos) - (x->pos < y->pos);
}

int main(void) {
    struct staff s[] = {{"ann", "ops", 0}, {"bob", "dev", 0}, {"cy", "ops", 0}, {"di", "dev", 0}, {"ed", "ops", 0}};
    size_t n = sizeof s / sizeof s[0];
    for (size_t i = 0; i < n; i++) s[i].pos = i;

    qsort(s, n, sizeof s[0], by_team_then_pos);
    for (size_t i = 0; i < n; i++) printf("%s %s\n", s[i].team, s[i].name);
    return 0;
}
Output
dev bob
dev di
ops ann
ops cy
ops ed
  • Verdict: idiom. qsort does not promise a stable sort. Each record stores its original position, and the comparator compares the position when the teams are equal, so the result is the same as a stable sort.
using System;
using System.Collections.Generic;
using System.Linq;

var staff = new List<(string Name, string Team, int Grade)>
{
    ("ann", "ops", 3), ("bob", "dev", 2), ("cy", "ops", 2), ("di", "dev", 3), ("ed", "ops", 2),
};

static string Names(IEnumerable<(string Name, string Team, int Grade)> s) => string.Join(" ", s.Select(p => p.Name));

// LINQ OrderBy is stable: equal teams keep the name order.
Console.WriteLine(Names(staff.OrderBy(p => p.Team, StringComparer.Ordinal)));

// ThenBy adds a second key to the same stable sort.
Console.WriteLine(Names(staff.OrderBy(p => p.Team, StringComparer.Ordinal).ThenBy(p => p.Grade)));

// List<T>.Sort is not stable. The original position breaks the ties.
var indexed = staff.Select((p, i) => (p, i)).ToList();
indexed.Sort((a, b) =>
{
    int c = string.CompareOrdinal(a.p.Team, b.p.Team);
    return c != 0 ? c : a.i.CompareTo(b.i);
});
Console.WriteLine(Names(indexed.Select(x => x.p)));
Output
bob di ann cy ed
bob di cy ed ann
bob di ann cy ed
  • Verdict: native. LINQ OrderBy is stable, so equal teams keep the name order, and ThenBy adds the grade. List<T>.Sort is not stable, so the program pairs each item with its position and compares the position when the teams are equal.
JavaScriptGitHub
const staff = [
  { name: "ann", team: "ops", grade: 3 },
  { name: "bob", team: "dev", grade: 2 },
  { name: "cy", team: "ops", grade: 2 },
  { name: "di", team: "dev", grade: 3 },
  { name: "ed", team: "ops", grade: 2 },
];
const names = (a) => a.map((p) => p.name).join(" ");

// sort and toSorted are stable, so the name order stays inside each team.
console.log(names(staff.toSorted((a, b) => a.team.localeCompare(b.team))));

// Two stable passes: the second key first, then the first key.
const pass1 = staff.toSorted((a, b) => a.grade - b.grade);
console.log(names(pass1.toSorted((a, b) => a.team.localeCompare(b.team))));

// One pass with a chained compare function gives the same order.
console.log(names(staff.toSorted((a, b) => a.team.localeCompare(b.team) || a.grade - b.grade)));

// A reversed compare function keeps equal items in their old order.
console.log(names(staff.toSorted((a, b) => b.team.localeCompare(a.team))));
Output
bob di ann cy ed
bob di cy ed ann
bob di cy ed ann
ann cy ed bob di
  • Verdict: native. toSorted is stable, so the team sort keeps the name order. Two passes and one chained compare function give the same order. A compare function with swapped arguments sorts the teams in descending order and keeps the equal items in their input order.
package main

import (
	"cmp"
	"fmt"
	"slices"
	"sort"
)

type staff struct {
	name  string
	team  string
	grade int
}

func names(s []staff) []string {
	out := make([]string, len(s))
	for i, p := range s {
		out[i] = p.name
	}
	return out
}

func main() {
	all := []staff{{"ann", "ops", 3}, {"bob", "dev", 2}, {"cy", "ops", 2}, {"di", "dev", 3}, {"ed", "ops", 2}}

	// slices.SortStableFunc keeps equal teams in the name order.
	s := slices.Clone(all)
	slices.SortStableFunc(s, func(a, b staff) int { return cmp.Compare(a.team, b.team) })
	fmt.Println(names(s))

	// sort.SliceStable is the older form with a less function.
	s = slices.Clone(all)
	sort.SliceStable(s, func(i, j int) bool { return s[i].grade < s[j].grade })
	sort.SliceStable(s, func(i, j int) bool { return s[i].team < s[j].team })
	fmt.Println(names(s))

	// slices.SortFunc is not stable. A full key, here team, grade and name,
	// leaves no equal items, so the result is the same on every run.
	s = slices.Clone(all)
	slices.SortFunc(s, func(a, b staff) int {
		return cmp.Or(cmp.Compare(a.team, b.team), cmp.Compare(a.grade, b.grade), cmp.Compare(a.name, b.name))
	})
	fmt.Println(names(s))
}
Output
[bob di ann cy ed]
[bob di cy ed ann]
[bob di cy ed ann]
  • Verdict: native. slices.SortStableFunc keeps the name order inside each team. Two sort.SliceStable passes sort by team and then by grade. slices.SortFunc is not stable, so the program compares the team, the grade and the name, and no two items are equal.
RustGitHub
fn names(s: &[(&str, &str, u32)]) -> Vec<String> {
    s.iter().map(|p| p.0.to_string()).collect()
}

fn main() {
    let all = vec![("ann", "ops", 3), ("bob", "dev", 2), ("cy", "ops", 2), ("di", "dev", 3), ("ed", "ops", 2)];

    // sort_by_key is stable: equal teams keep the name order.
    let mut s = all.clone();
    s.sort_by_key(|p| p.1);
    println!("{:?}", names(&s));

    // Two stable passes: grade first, then team.
    let mut s = all.clone();
    s.sort_by_key(|p| p.2);
    s.sort_by_key(|p| p.1);
    println!("{:?}", names(&s));

    // sort_unstable_by_key may reorder equal items. A key that includes the
    // original position makes the result the same as a stable sort.
    let mut s: Vec<(usize, _)> = all.iter().copied().enumerate().collect();
    s.sort_unstable_by_key(|&(i, p)| (p.1, i));
    println!("{:?}", s.iter().map(|&(_, p)| p.0).collect::<Vec<_>>());
}
Output
["bob", "di", "ann", "cy", "ed"]
["bob", "di", "cy", "ed", "ann"]
["bob", "di", "ann", "cy", "ed"]
  • Verdict: native. sort_by_key is stable, so one pass keeps the name order and two passes sort by team and then by grade. sort_unstable_by_key may reorder equal items, so the key includes the position from enumerate, and the result is the same as the stable sort.
  • Reverse order and stability. A descending stable sort keeps equal items in their input order. The Python HOWTO says: "The reverse parameter still maintains sort stability (so that records with equal keys retain the original order)"2. An ascending sort followed by a reversal of the list gives the same keys in descending order, but it also reverses the equal items.
  • Partial sorts and selection. Algorithms that find the k smallest items, for example std::partial_sort or a heap, are usually not stable. Add a position key when the order of ties matters.
  • Grouping. A stable sort by a key puts the items of each group together and keeps their input order inside the group. Some grouping functions depend on this. See group items by a key.
  • Sorting in a database. A table has no input order. PostgreSQL says that without a sort step "the rows will be returned in an unspecified order" and that the order "must not be relied on"23. Rows with equal ORDER BY keys have the same problem, so a query that pages through results must add a unique column as the last key.
  • Runs in the input. A stable adaptive sort, for example Timsort, finds runs that are already sorted. The Python HOWTO says that Timsort "does multiple sorts efficiently because it can take advantage of any ordering already present in a dataset"2, so a second pass over the result of a first pass is fast.

Pitfalls

  • Testing for stability. A sort that does not promise stability can keep the order of ties on a small input, for example when it uses insertion sort for short arrays. A test with five items then passes, and a production input with many items gives another order. Read the documentation of the sort.
  • Passes in the wrong order. In a multi-pass sort, the last pass is the main key. A program that sorts by team first and by grade second gets a list sorted by grade, with the teams in order only inside each grade.
  • A reversed list is not a descending stable sort. reversed(sorted(xs, key=k)) puts the equal items in the reverse of their input order. Use reverse=True, a descending comparator or a negated key.
  • An unstable sort in a multi-pass sort. Every pass after the first must be stable. In C#, List<T>.Sort in a second pass can destroy the order of the first pass. Use OrderBy and ThenBy, or one compound key.
  • A comparator that adds hidden ties. A comparator that compares only a part of the key, for example the first letter of a name, makes many items equal. A stable sort keeps their input order, which can look like a bug in the comparator.
  • Database pages. ORDER BY created_at LIMIT 10 OFFSET 10 can show one row twice and skip another when several rows have the same created_at. Add the primary key to the ORDER BY.

Cost

A stable comparison sort has the same O(n log n) bound for comparisons as an unstable one. The usual cost of stability is memory: a merge sort needs a buffer of up to n items, while quicksort and heapsort need only a small stack. Rust says that its unstable sort is in place and "does not allocate"14. Stable in-place merge sorts exist, but they are more complex and slower. An unstable sort with a position key needs O(n) memory for the positions, so it has no memory advantage. For arrays of primitive values, where stability has no visible effect, an unstable sort is often a little faster.

History

Stability became a common promise of library sorts over time. C qsort does not promise it3, and C++ has the separate function std::stable_sort15. Tim Peters wrote Timsort for CPython and described it as "an adaptive, stable, natural mergesort, modestly called timsort"4. His notes also say: "It turns out that Perl is moving to a stable mergesort"4. Java uses an adaptation of Timsort for its object sorts5.

JavaScript engines did not all have a stable sort, and a program could get a different order of ties in each browser. The ECMAScript specification now requires a stable sort67. Newer libraries often give both forms and name the unstable one: Rust has sort and sort_unstable14, and Go has SortFunc and SortStableFunc13.

References

  1. Built-in Types, Python documentation, Lists; sort
  2. Sorting Techniques, Python documentation, Sort Stability and Complex Sorts; Ascending and Descending
  3. qsort, qsort_s, C reference, cppreference.com, Description
  4. listsort.txt, CPython source, Intro
  5. Class Arrays, Java SE 25 API, sort(Object[]); sort(int[])
  6. ECMAScript Language Specification, Indexed Collections, SortIndexedProperties
  7. Array.prototype.sort(), MDN Web Docs, Sort stability
  8. Interface List, Java SE 25 API, sort
  9. List<T>.Sort Method, .NET API reference, Remarks
  10. Array.Sort Method, .NET API reference, Remarks
  11. Enumerable.OrderBy Method, .NET API reference, Remarks
  12. Package sort, Go standard library, Slice; SliceStable; Sort; Stable
  13. Package slices, Go standard library, SortFunc; SortStableFunc
  14. Primitive Type slice, The Rust Standard Library, sort; sort_unstable
  15. std::stable_sort, C++ reference, cppreference.com, Description
  16. std::sort, C++ reference, cppreference.com, Description
  17. sortWith, Kotlin standard library, Description
  18. sortedWith, Kotlin standard library, Description
  19. Interface Stream, Java SE 25 API, sorted
  20. std::list::sort, C++ reference, cppreference.com, Description
  21. Data.List, Haskell base library, sort
  22. Sort-Object, PowerShell documentation, Syntax; Example 11
  23. Sorting Rows (ORDER BY), PostgreSQL documentation, 7.5

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/AN08PB/text.yaml