Problem

Return length-2 array with two ints in non-decreasing order.

Examples

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