GATEverse Practice, past papers & mock tests
GATE 2024 · CS2 - Afternoon
AlgorithmsSortingmediumNAT1 mark
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 ___________
Save your progress

Related Algorithms PYQs