New answers tagged


Python 2, 134 bytes from random import* w,h=input();w+=1 t={1} while 1:z=choice([{a,b}for a in t for b in{a-1,a+1,a-w,a+w}-t if b%w>0<b<w*h]);print z;t|=z Try it online! A small improvement over xnor's answer by using row size w+1 instead of w and not using the zeroth column. For example, the following coordinates are used for the input 3,2: 1-2-...

Top 50 recent answers are included