Name: Anonymous 2011-09-26 1:44
You stumble upon a new programming language.
1) The programming language has a main built-in data type called
2) You discover that the programming language also has a built-in data type called
1) The programming language has a main built-in data type called
list, used as such: l = [1,2,3];. What would you normally expect of the underlying implementation -- would you expect it to be a linked-list (random access O(N)), an array (resize O(N)), or perhaps an unrolled link list (random access and resize amortized O(log(N)))?2) You discover that the programming language also has a built-in data type called
array. How does this affect your assumptions relative to list, and what will your new expectancies relative to array be?