[Date Index] [Thread Index] [Author Index]
Re: Algorithm Analysis Course: Should I use Mathematica for projects?
On 12 Jul 2012, at 10:58, Richard Fateman wrote: > It would be better to use a programming language in which Lists are > lists, not arrays and accessing elements in an array of length N is an > O(1) operation, not O(N). I have no idea what was meant by "accessing elements" in the quote above but "retrieving elements" from Mathematica's lists ("arrays") is in fact constant time (i.e. O(1)). In fact, this is the main reason why Mathematica uses this particular data structure. The price of this is that one cannot efficiently extend Mathematica's lists, but there are well discussed ways of avoiding this problem. AndrzejKozlowski