Hacker News new | ask | show | jobs
by d--b 1584 days ago
OP meant O(1) in time and space (forgot the space but it’s in the linked article). That solution is O(N) in space.