OKI interview question

A* search for optmization process