Longest 'Random Non intersecting' path in a grid

224 Views Asked by At

Given a grid size(m*n), how could one generate a random path between a start(x1, y1) and end(x2, y2) point with the added condition that the random path covers all the nodes

e.g.

  • Grid of size 5*6
  • Start Point -> (1, 1)
  • End Point -> (1, 6)

What approach can be used to generate a random path that begins at (1, 1) and ends at (1, 6), plus the path travels through remaining 28 nodes?

0

There are 0 best solutions below