
Hi, Can someone elaborate on how to create a DS which acts like an array or vector and has same time complexity ? A list though can act like array but getting value at index i is linear time but in actual array it is constant. Regards. Nishant

On 3/28/2014 12:30 AM, Nishant wrote:
Can someone elaborate on how to create a DS which acts like an array or vector and has same time complexity ?
A list though can act like array but getting value at index i is linear time but in actual array it is constant.
I was just reading http://www.haskell.org/haskellwiki/Arrays

On Fri, 28 Mar 2014 06:30:38 +0100, Nishant
Can someone elaborate on how to create a DS which acts like an array or vector and has same time complexity ?
An often advised package is vector, see: http://www.haskell.org/haskellwiki/Numeric_Haskell:_A_Vector_Tutorial Regards, Henk-Jan van Tuyl -- Folding@home What if you could share your unused computer power to help find a cure? In just 5 minutes you can join the world's biggest networked computer and get us closer sooner. Watch the video. http://folding.stanford.edu/ http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html Haskell programming --
participants (3)
-
Henk-Jan van Tuyl
-
John M. Dlugosz
-
Nishant