CSC3100 Data Structures Fall 2024 Programming - Assignment 2: Queue and Time Complexity
CSC3100Data StructuresQueueTime ComplexityJavaC++
Given an n-length list, the value ai in the list satisfies that ai ∈ {1, ..., n} and i = 1, ..., n. Then, numbering each element ai in the list as bi, bi = i. Please find the minimum number of elements that should be deleted so that the list of remaining elements has the same elements as the list of their corresponding numbers.