Something went wrong. Try again.
[[MIRROR from GitHub]] Property based testing framework for JavaScript (like QuickCheck) written in TypeScript fast-check.dev
Something went wrong. Try again.
12345678910111213export function insertionSort(values: readonly number[]): number[] { const sorted: number[] = []; for (const value of values) { const index = sorted.findIndex((other) => other > value); if (index === -1) { sorted.push(value); } else { sorted.splice(index, 0, value); } } return sorted;}