+ // reize table if its maximum load exceed the load factor
+ // OR it was less then half of the load factor
+ size_t min_buckets = 0;
+ if ((max_load > load_factor) || ((2 * max_load) < load_factor)) {
+ min_buckets = _max_size / load_factor;
+ }
+
+ if (min_buckets) {
+ // find power-of-2 size large than min_buckets;
+ int nb;
+ for(nb=2;nb<min_buckets;nb*=2);
+ num_buckets = nb;
+
+ delete[] buckets;