ParentFull threadAlotOfReading·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).View on HN