Insertion Sort

Sort an array using the insertion sort algorithm by building a sorted portion one element at a time.

Code

Algorithms
echo "$arr" | jq 'sort'

Parameters

Array to sort (JSON)

Server

More Bash Snippets