Problem

Return a new array sorted ascending using insertion sort.

Examples

  • insertionSortCopy([4, 2, 3]) -> [2, 3, 4]
Compile and test (Ctrl+Enter)