I would like to know how we can extend this algorithm (Hamiltonian path with shortcuts) for adding borders/walls in the board (similar to nokia 6110 snake game levels)? and how we can make this algorithm work for both width & height having odd numbers?