All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Inversion?

Also known as: inversion (of a sequence)

Definition 19.3 University Computer Science — Year 1 · Chapter 19 — Sorting

An inversion of a sequence aa is a pair of positions i<ji < j with ai>aja_i > a_j.

Returned books go back one at a time into shelves that are already in order: insertion sort, which is fast when only a few items are out of place.
Returned books go back one at a time into shelves that are already in order: insertion sort, which is fast when only a few items are out of place.
Read in context →