Skip to content

Comment on How to Make a Computer Operating System in C/C++parent

Comments

Indeed, coming from Prolog/Erlang-style "most everything can be represented as a tail-call with a linked-list accumulator" programming, I'm very confused about what operations the GP is talking about. Adding/removing nodes at a position other than the head? Lookup by value? If you need these, you should be using a different data structure.

Removing from any location is O(1), as is adding to any location you have a link to.

With a real linked list at least, not with std::list.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.