Find substring where all chars appear at least k | TikTok