• + 11 comments

    Could you by any chance explain why you do

    if(!deque.contains(first)){
        set.remove(first);
    }
    

    for some reason I just don't seem to get the logic in it.