Use tree data structure to find the path of a knight on a chess board from a starting position to an ending position