A* algorithm _C language implementation