Minimum Front Removals for a Distinct Suffix
Asked at Amazon · Coding Questions · Difficulty: Easy
You may only remove the leftmost element. Return the minimum number of removals so that the remaining array (a suffix) has all distinct values.
Loading the problem…