Sorting algorithms/Strand sort

FCC link

Write a function to sort an array using the Strand sort. The function should return the sorted array.

This is a way of sorting numbers by extracting shorter sequences of already sorted numbers from an unsorted list.

Test

{{test}}

Console output