[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/feinibuai/JavaArithmetic/master/src/LeetCode/LeetCode219.java [Back]  [Original]

package LeetCode;

import java.util.HashSet;

public class LeetCode219 {


    // https://leetcode.com/problems/contains-duplicate-ii/description/
    // : O(n)
    // : O(k)

    public boolean containsNearbyDuplicate(int[] nums, int k) {

        if(nums == null || nums.length 

Web Proxy Viewer  |  New URL  |  Original Page