ParentFull threadpantaloons·If you limit n then than the algorithm is actually O(1) time too -- his answer is wrong either way.View on HN