Java easy Hashmap - beats 98%
\nclass Solution {\n    \n    Random r = new Random();\n    Set<Integer> set = new HashSet<>();\n    Map<Integer, Integer> map = new HashMap<>();\n    int range
```\nclass Solution {\n    \n    Random r = new Random();\n    Set<Integer> set = new HashSet<>();\n    Map<Integer, Integer> map = new HashMap<>();\n    int range;\n    \n    public Solution(int N, int[] blacklist) {\n        \n        int BLen = blacklist.length;\n        int WLen = N- BLen;\n        range = WLen;\n        \n        for (int num : blacklist){\n            if (num >= WLen)\n                set.add(num);\n        }\n        \n        int j = WLen;\n        for (int num : blacklist){\n            if (num < WLen){\n                while(set.contains(j))\n                    j++;\n                map.put(num,j++);\n            }\n        }\n    }\n    public int pick() {\n        int key = r.nextInt(range);\n        return map.getOrDefault(key, key);\n    }\n}\n```
['Java']