Company: Turing_1nov
Difficulty: medium
Render Array Non Decreasing Problem Description You are given an integer array arr1 in which every element is 1, 2 or 3 -- no other value ever appears. You may delete elements one at a time, in any order. What is the smallest number of deletions that leaves a non-decreasing array, that is, one where arr[i] <= arr[i + 1] holds for every neighbouring pair? An array with one element, or none, counts as non-decreasing. Function Description Complete the minRemovals() function provided in the editor. It takes the following parameter and returns the answer. arr1: the array, each element being 1, 2 or 3 Input Format Note: use this input format if you are testing against custom input or writing code in a language where we do not provide boilerplate code. A single line holding the array as a comma-separated list in square brackets, for example [2,1,3,2,1] . Output Format Print one integer: the least number of elements that have to be removed. Constraints 1 <= length of arr1 <= 80000 (in