This year, I took up cross-stitching to decorate my place. I picked a complex design for the heck of it, too. Shortly after I inserted three strands into the fabric, I realized that we could cast cross-stitch as an optimization problem (shortest path).
See, if your strands haphazardly jump from one block to another, you will suffer a shortage of strands. The key is to, whenever possible, move from one block to an adjacent one horizontally or vertically by 1 unit. If that is not possible, then move diagonally in the fewest units possible.
By following these procedures, we get x’s on the front and a neat array of l’s on the back. I even saved enough strands to create a full border.