
4 Dec
2014
4 Dec
'14
11:42 a.m.
Hi, I want to create an array without initializing its elements, so that array creation takes constant time (modulo heap management). What are possible approaches for this? I thought about using newArray_ with the IOUArray type. Is this guaranteed to not initialize any elements and run in O(1)? Are there other ways? All the best, Wolfgang