Minimum Consecutive Cards to Pick Up
Remember the latest index of each card value in a hash map; the closest repeat of a value gives the shortest run.
Remember the latest index of each card value in a hash map; the closest repeat of a value gives the shortest run.