Re: Algorithm Analysis Course: Should I use Mathematica for projects?

*To*: mathgroup at smc.vnet.net*Subject*: [mg127272] Re: Algorithm Analysis Course: Should I use Mathematica for projects?*From*: Andrzej Kozlowski <akozlowski at gmail.com>*Date*: Fri, 13 Jul 2012 02:53:02 -0400 (EDT)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*Delivered-to*: mathgroup-newout@smc.vnet.net*Delivered-to*: mathgroup-newsend@smc.vnet.net*References*: <jtkuhh$2a$1@smc.vnet.net> <20120712085845.B341E6859@smc.vnet.net>

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

**References**:**Re: Algorithm Analysis Course: Should I use Mathematica for projects?***From:*Richard Fateman <fateman@cs.berkeley.edu>