2 comments

[ 3.6 ms ] story [ 12.0 ms ] thread
Is this actually O(1)?

Because the electricity has to to travel the shortest path it seems like it is at best O(shortest path length). The constant factor is of course very small.

if you have to wire thousands of LEDs, it will take significantly longer to setup the problem, and I think that should factor into the time complexity