Re:Ask HN: What is the most beautiful piece of code you've e...
by Const-me on Monday October 28, 2019 @03:04AM
(#21374869)
One line, not completable:
Also, I don't believe it doesn't depend on width. I think with constant height, the probability of completable one should increase with width, and become almost 1 for very large widths.
[ Parent
| on HN ]
Re:Ask HN: What is the most beautiful piece of code you've e...
by scrollaway on Monday October 28, 2019 @03:13AM
(#21374900)
Hm, good points, looks like I need more sleep. Looking at the video again, a path is valid if two slashes follow each other, with the same pattern shifted by 1 the line below.
But I wasn't treating /\ as an invalid on the first line. Eg thinking of:
/\/\/\/\
\\//////
/\\\\\\\ … and so on
(Using the /\ pattern, paths can go back up and come back down, so this requires a lot more thought than I instinctively put into it)