about | help | code help+videos | done | prefs |
apcsaListReplaceZeros
Given an ArrayList of Integers lst and a number num, replace all the zero entries in lst with num. Return the ArrayList. apcsaListReplaceZeros([0, 5], 3) → [3, 5] apcsaListReplaceZeros([5, 0, 3, 2, 0], -10) → [5, -10, 3, 2, -10] apcsaListReplaceZeros([2, 32, 33, 0], 1) → [2, 32, 33, 1] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy