Home > OS >  Building an unbroken route between two pixels
Building an unbroken route between two pixels

Time:07-31

I have a closed figure of pixels. Pixels with 3 or more neighbors I highlighted in red. enter image description here

In the worst case, the workload is proportional to the sum of the lengths of the paths between the starting point and the related red points, and this is optimal.

In the best case, it is the length of the shortest path between the two given points.

  • Related