Codesignal - arrayReplace
Given an array of integers, replace all the occurrences of elemToReplace with substitutionElem. Example For inputArray = [1, 2, 1], elemToReplace = 1, and substitutionElem = 3, the output should be arrayReplace(inputArray, elemToReplace, substitutionElem) = [3, 2, 3]. Input/Output [execution time limit] 20 seconds (swift) [input] array.integer inputArray Guaranteed constraints: 0 ≤ inputArray.le..
2021. 4. 29.