Let \(A\) be an array containing integer values. The distance of \(A\) is defined as the minimum number of elements in \(A\) that must be replaced with another integer so that the resulting array is sorted in non-decreasing order. The distance of the array \([2,5,3,1,4,2,6]\) is
GATE CS 2024 · Set-2 · Arrays & Matrix Representation
Solve it on GATE DA practice →More Basic Data Structures problems