Answered step by step

Verified Expert Solution

## Question

1 Approved Answer

# Question 1 Cdd - Even - Transform Problem works on an array of integers ( bath popitive, neginive. and zero ) , by taking in

Question $1$

Cdd$-$Even$-$Transform Problem works on an array of integers $($bath popitive, neginive. and zero$),$ by taking in a value $($a whole number$)$ that specifies the mumber of times the transformation has to be applied.

On an array of integers, the transformation that needs to occur, $n$ number of times:

$7$

Adds three $(+3)$ to each odd integer.

Subtracts three $(-3)$ from each even integer

Example:

$[3,\text{}4,\text{}9],\text{}3$ means, the array with integers $3,4,9$ has to undergo transformation $3$ times.

$[3,4,9]=>[6,1,12]=>[3,4,9]=>[6,1,12]$

So the resuit is $6,1,12$

Function Description

Complete the function oddEven Transform in the editor below. OddEvenTransform has the following parameter$($s$)$: arr: an array of integers

## Step by Step Solution

There are 3 Steps involved in it

### Step: 1

### Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

### Step: 2

### Step: 3

## Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started