Greedy Best First Search Code In Java