Saltar al contenido principal

4 documentos etiquetados con "sliding-window"

Ver Todas las Etiquetas

Contains Duplicate II

This question is asked by Google. Given an array, nums, and an integer k, return whether or not two unique indices exist such that nums[i] = nums[j] and the two indices i and j are at most k elements apart.