Y
Hacker News
new
|
ask
|
show
|
jobs
by
AlotOfReading
22 days ago
You don't have to assume that. We can take each randomly oriented noodle and orient it correctly in O(1) as a preprocessing step. Since the complexity would be additive, the overall complexity remains O(N).