Hacker News new | ask | show | jobs
by mattknox 5733 days ago
technical erratum: if each node in the list adds all the previous nodes as new objects, then with 4 nodes, the total number of objects is 10, not 24, and the overall order of the operation is O(n^2). It's still cool that he is faster, and cooler that it is using an AST, which seems to me like the right solution.
1 comments

Oops! You're right. Should be O(n^2). I'll update. :-)