Contains duplicate within distance K
Return whether an array has two equal values whose indices differ by at most k. Start with a map from value to its last index. Follow-up: cut the extra space to O(k) by dropping indices that fall out of the window as you go.
No answer yet. Write the first one; the best answer gets endorsed.
