Description Submission Counting sort O(200N) When d is even and d/2, d/2+1 lies in the middle is a special case
Frequency Queries
Submission Build index on the number of occurrences Otherwise, in linear query, one case will exceed the time limit
Array Manipulation
Description Submissions Submission 1 O(n^2) exceeds the time limit for large test case a naive solution Submission 2 Focus on the less changed value, the […]
Minimum Swaps 2
Description Submission Swap the one at wrong position to the right position