You could use a B-Tree or even a simple binary tree to index into the
array, but the space will be doubled (it is justified if you store
some other object in the array other than integers).

On 11/17/06, Nik <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have an array in which elements are present .
> The number of elements n <= 10^6 .
> Now if i delete an element in the array, i want to update the
> array by moving all the elements to the left. It is very slow
> considering the size of element and i want to access the array
> with new updated indexes (it needn't be o(1) it can be atmost O(logn))
>
>
> ex: 4 3 2 100
> arr[2]=2;
> once i access the index i delete the element,
> So the new array should be 4 3 100, arr[2] should be now 100 etc.
>
> Can someone suggest me a good way to solve this problem
>
> Reg
> Nik
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups-beta.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to