That's not entirely stupid, one could certainly do that under some circumstances. E.g. when sorting by one key and looking up via another, one could create a form of partial index in an array, and...
Type: Posts; User: iMalc
That's not entirely stupid, one could certainly do that under some circumstances. E.g. when sorting by one key and looking up via another, one could create a form of partial index in an array, and...
Whoa whoa whoa... Who said anything about an array?! "linked-list" is right there in the thread title, and I would very much hope you at least read that.
Threading it isn't a terrible idea if the...
Sounds like you didn't read my very specific answers yet then. I made what I believe is a very good assumption about what was being asked - the same assumption you made in fact. I then stated that...
Oh okay. Yeah for that case I'd simply go with option 1.
I think Phantomotap has more of a problem with your use of the word "need" there, rather than your argument in general. I can tell because...
You're describing the same case as me, so if you consider that a third option, I don't know what you consider the second one is.
Sure his question is unclear, but I have clearly stated that I took his question to be about the difference between taking n items and inserting each one one at a time into a list in order, vs...
Inserting each item in order as you go is O(n*n), so to beat that when sorting after items have just been appended in random order, all you need is a sorting algorithm that is better than O(n*n)....