PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Dynamic array
Date: Thursday, 09 Apr 2020, 13:14:13


    > Message Posted By: Unknown
    >
    > the specs says:
    > It should use hashing with chaining, but with an ordered, dynamic array
    > (i.e., one malloc()'d to be of the right size during every insertion) in
    > place of the usual headless linked list.
    >
    > Does this mean that with each insertion, we increase the size of the array
    > by one triple (which means that each insertion we need to realloc thing),

Yes.
=====

    > or can we double the array size every
    > time we fill up the array(which means less realloc and more efficient)

No.
=====

    > By "ordered", you mean the order of triples inserted right? I don't see
    > why or how we can order this array of triples in other ways.

No, "ordered" means in key order, so that unsuccessful
search takes half the time on average.

--Stan-
PREV INDEX NEXT