News for hackers. Stuff that matters.
Re:How to get hired (or, 'The silly story of interviewing in... by tptacek on Monday December 19, 2011 @02:28PM (#3370779)
Linked lists are overused even in C, where they have a natural expression.

The reason to use a list instead of an array is that it's cheap to insert/delete anywhere into a list, but expensive to do so in the middle of an array.

There's probably no expression of a list in Ruby where insertion is cheaper than inserting into an array. Perhaps if your "list" is a secondary Fixnum index on a larger pool of objects? At any rate, that's no longer a "linked list".

I think it's a silly question. I hope the expected answer is, "why would I ever do that?"

There are no comments on this comment yet.