Problem

Return copy; from index i set rest to val.

Examples

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