@@ -0,0 +1,593 @@
+package com.anuragkapur.leetcode;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A/**%0A * @author anuragkapur%0A */%0Apublic class ContainsDuplicateII %7B%0A%0A    public boolean containsNearbyDuplicate(int%5B%5D nums, int k) %7B%0A%0A        Map%3CInteger, Integer%3E numberIndices = new HashMap%3C%3E();%0A%0A        for(int i=0; i%3Cnums.length; i++) %7B%0A            for(int j=i+1; j%3Cnums.length; j++) %7B%0A                if(j-i %3E k) %7B%0A                    break;%0A                %7D%0A                if(nums%5Bi%5D == nums%5Bj%5D) %7B%0A                    return true;%0A                %7D%0A            %7D%0A        %7D%0A        return false;%0A    %7D%0A%7D%0A

Add brute force solution for problem #219