Problem

Return new array with val inserted at index i (shift right).

Examples

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