I don't write C++, but if it has linked lists then at least the first one should be trivial. The second one would probably involve function pointers.
Maybe his point was that you need to use a linked list rather than an array to get an efficient solution? Coming from a Scheme/ML/Haskell background I tend to view linked lists as much simpler than arrays!