Company: Turing_1nov
Difficulty: medium
Render Array Non Decreasing Problem Description Imagine that you are given an integer array arr1 as input. Also, the integers can be only 1, 2 or 3. No other integers are allowed. You can remove an element from the above array one at a time. Return the minimum number of removals to make the array non-decreasing. Examples Example 1: Input: arr1 = [2,1,3,2,1] Output: 3 Explanation: Remove arr1[0], arr1[2] and arr1[3]. Example 2: Input: arr1 = [1,3,2,1,3,3] Output: 2 Explanation: One of the optimal solutions is to remove nums[1] and nums[2]. Example 3: Input: arr1 = [2,2,2,2,3,3] Output: 0