Balanced Search Trees Node using arrays: is that possible?



Hey folks,

i am faced with the task to build an indexing enginee (not to invent a
new one). Then, i turn to this newsgroup in order to dig if my approach
is feasible.

I would like to have an array of n positions, a[0...n-1]. Each position
p of such array will be seen as a node.

I would like to be able to insert/delete and retrieve dynymically in
O(log n), using the following schema for addressing node:

LEFT_NODE(x) = 2 * x + 1
RIGHT_NODE(x) = 2 * (x + 1)
UPPER_NODE(x) = (x - 1)/2

Is it possible to approach it using arrays or node and have worst-case
scenario O(log n)?
I was think about Binary BTree or some thing related to BTree.

Thanks in advance.

.



Relevant Pages

  • Re: Solar Systems, Entry level--- More
    ... Andy replies ... not rely on newsgroup advice..... ... In addition, to achieve the 27.5 kwh/day, the array would have to ... and then learning the engineering behind the system.... ...
    (alt.home.repair)
  • Re: Complex query and PHP handling advice sought
    ... What I have done so far writes the top three header rows based on the events table and all that works fine. ... Or perhaps an array of row arrays to be written out row by row. ... // first connect to the database table ... First of all, this is a PHP newsgroup, not a SQL newsgroup. ...
    (alt.php)
  • Re: <ctype.h> toLower()
    ... since you've only been troubling this newsgroup for just ... Greg Comeau has posted almost 4500 articles in here, ... because not only do I know perfectly well what an array ... > different angles with twisted interpretaions and misguided concepts. ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Array
    ... And why are you putting the array values into the variables? ... >> a quicker response by posting to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)
  • Re: Display x number of records
    ... Modify the query to only return the number of records you wish to display ... When using GetRows to stuff your recordset's data into an array, ... Count the records as you write them to the Response object, ... Please reply to the newsgroup. ...
    (microsoft.public.inetserver.asp.db)