Contains Duplicate II

Given an array and an integer k, return true if there are two equal values with indices at most k apart.

Examples
Input: [[1,2,3,1],3]
Output: true
Hints

Contains Duplicate II

Given an array and an integer k, return true if there are two equal values with indices at most k apart.