if hashmap contains only one key then how to get that key
HashMap<Node, Integer> x = qu.remove();
// This "qu" is a queue which is returning a Hashmap
// of type HashMap<Node, Integer> this hashmap contains
// only one key,value pair
Node node = x.keySet().iterator().next();
// here we are extracting that "KEY" of hashMap into variable of Node type