Problem

Return a new array sorted ascending using selection sort.

Examples

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