void go(List<List<Integer>> rooms, Set<Integer> set, int i) {
        if (set.contains(i))
            return;
        set.add(i);
        for (Integer key : rooms.get(i)) {
            if (!set.contains(key))
                go(rooms, set, key);
        }
    }
Why Did you create this class? what does it do?
src/problems/medium/RoomsAndKeys.java