Visa Online Assesment
Anonymous User
2185

Ques)-> There is an array of length n you have to apply minimum number of operations on the array elements such that for any pair of adjacent elements (arr[i]%2!=arr[j]%2)(more formally two even number or two odd numbers should not be adjacent to each other) you can divide an array element by 2 possibly zero or any number of times dividing an array elemnt by 2 will be counted as 1 operation.

Constraint:(n<=10^5)

Comments (3)