Min deletions to avoid overlap in first k | Google Coding Question