Editing Talk:2483: Linked List Interview Problem
Please sign your posts with ~~~~ |
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 4: | Line 4: | ||
This code won't mail the linked list to a museum - it will mail the memory location of the head of the list to a museum.{{unsigned ip|172.70.130.192}} | This code won't mail the linked list to a museum - it will mail the memory location of the head of the list to a museum.{{unsigned ip|172.70.130.192}} | ||
:I think part of the joke might be that the high-level language being used will actually spit out a representation of the entire list when using the str function. So it actually does all the traversing and abstracts it away, again making the interview question seem redundant! [[Special:Contributions/162.158.159.48|162.158.159.48]] 10:40, 1 July 2021 (UTC) | :I think part of the joke might be that the high-level language being used will actually spit out a representation of the entire list when using the str function. So it actually does all the traversing and abstracts it away, again making the interview question seem redundant! [[Special:Contributions/162.158.159.48|162.158.159.48]] 10:40, 1 July 2021 (UTC) | ||
− | |||
− | |||
just to make sure I get this right. | just to make sure I get this right. | ||
Line 17: | Line 15: | ||
:That it potentially becomes spaghetti-data should not concern you so long as you don't have spaghetti-code as well which causes some oversight of data-mangling to mess things up. And you'll probably want to maintain a custom data-dumper/collator/formatter capability to keep an eye on things as you're debugging the inevitably miswritten shuffle-function, and/or do battle with the compiler's garbage-handling insertions when you confuse it beyond reasonable limits. (No, wait, did you do full low-level garbage-handling yourself? Did you do it ''properly''? ;) ) | :That it potentially becomes spaghetti-data should not concern you so long as you don't have spaghetti-code as well which causes some oversight of data-mangling to mess things up. And you'll probably want to maintain a custom data-dumper/collator/formatter capability to keep an eye on things as you're debugging the inevitably miswritten shuffle-function, and/or do battle with the compiler's garbage-handling insertions when you confuse it beyond reasonable limits. (No, wait, did you do full low-level garbage-handling yourself? Did you do it ''properly''? ;) ) | ||
:...but I must say I'm not overly keen to abandon modern inbuilt splice-functions (for arrays/otherwise) doing all this hard work for me. Only if I'm looking at something of more of a net-/tree-like relationship (esp. non-Euclidean), or something with complicated multi-layered disparity of pointed-at data might I design up from such basic foundations. But I can also be nostalgic about when it was far more necessary! [[Special:Contributions/162.158.159.48|162.158.159.48]] 10:18, 1 July 2021 (UTC) | :...but I must say I'm not overly keen to abandon modern inbuilt splice-functions (for arrays/otherwise) doing all this hard work for me. Only if I'm looking at something of more of a net-/tree-like relationship (esp. non-Euclidean), or something with complicated multi-layered disparity of pointed-at data might I design up from such basic foundations. But I can also be nostalgic about when it was far more necessary! [[Special:Contributions/162.158.159.48|162.158.159.48]] 10:18, 1 July 2021 (UTC) | ||
− | + | ||
− | |||
Does anyone know when the last comic was that used colors? Is this something worth mentioning? --[[Special:Contributions/162.158.88.42|162.158.88.42]] 06:11, 1 July 2021 (UTC) | Does anyone know when the last comic was that used colors? Is this something worth mentioning? --[[Special:Contributions/162.158.88.42|162.158.88.42]] 06:11, 1 July 2021 (UTC) | ||
− | : I found the category: [[ | + | : I found the category: [[Category:Comics with color]]. --[[Special:Contributions/162.158.93.153|162.158.93.153]] 06:17, 1 July 2021 (UTC) |
I added some words regarding the title text. Feel free to expand/clarify/correct as necessary. [[Special:Contributions/172.69.35.209|172.69.35.209]] 06:57, 1 July 2021 (UTC) | I added some words regarding the title text. Feel free to expand/clarify/correct as necessary. [[Special:Contributions/172.69.35.209|172.69.35.209]] 06:57, 1 July 2021 (UTC) | ||
Line 32: | Line 29: | ||
Those wondering why linked lists are considered obsolete: insertion and deletion performance is rarely the issue these days. It's the cost of enumerating over all elements in the list. Both arrays and linked lists have O(n) complexity there, but arrays have the lower cost. And that's before we get into stuff like caches liking predictable access patterns (pointer chasing is not predictable) and all those pointers costing precious cache memory space.--[[User:Henke37|Henke37]] ([[User talk:Henke37|talk]]) 09:45, 1 July 2021 (UTC) | Those wondering why linked lists are considered obsolete: insertion and deletion performance is rarely the issue these days. It's the cost of enumerating over all elements in the list. Both arrays and linked lists have O(n) complexity there, but arrays have the lower cost. And that's before we get into stuff like caches liking predictable access patterns (pointer chasing is not predictable) and all those pointers costing precious cache memory space.--[[User:Henke37|Henke37]] ([[User talk:Henke37|talk]]) 09:45, 1 July 2021 (UTC) | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |