Problem

Copy list and set index i to val; return new array.

Examples

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