top | item 9528150 (no title) sharth | 10 years ago The second problem would be clearer if we knew how much scratch space we had. Is it zero? Is it O(1)? Is it O(n)? discuss order hn newest kspiteri|10 years ago You just need a constant number of pointers. This requires O(log n) scratch space because a pointer can be stored in O(log n) space. unknown|10 years ago [deleted] to3m|10 years ago Not if N=1 ;)(A constant amount is of course independent of N anyway!) load replies (2) jgrahamc|10 years ago Can be solved with no extra storage just three ints or pointers.
kspiteri|10 years ago You just need a constant number of pointers. This requires O(log n) scratch space because a pointer can be stored in O(log n) space. unknown|10 years ago [deleted] to3m|10 years ago Not if N=1 ;)(A constant amount is of course independent of N anyway!) load replies (2)
to3m|10 years ago Not if N=1 ;)(A constant amount is of course independent of N anyway!) load replies (2)
kspiteri|10 years ago
unknown|10 years ago
[deleted]
to3m|10 years ago
(A constant amount is of course independent of N anyway!)
jgrahamc|10 years ago