Question: Using recursion, write a Python function: def replace(A, d, e) which takes as input an array of integers A, and two integers d and e,

Using recursion, write a Python function: def replace(A, d, e) which takes as input an array of integers A, and two integers d and e, and changes A by replacing every occurrence of d with e. For example, if A is the array (10,0,2,0], replace(A,0,5) should change A to (10,5,2,5]. [3 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
