implemented dequeue graph
implemented heapfy graph