Open zainkai opened 7 years ago
add the following typedef struct{ ...//old vars keep float ResizeFactor } adtstk;
float adtstk_loadfactor(adtstk* obj){ //computer loadfactor of obj return obj->size/obj->capacity; }
do resize if loadfactor exceeds ResizeFactor var.
add the following typedef struct{ ...//old vars keep float ResizeFactor } adtstk;
float adtstk_loadfactor(adtstk* obj){ //computer loadfactor of obj return obj->size/obj->capacity; }
do resize if loadfactor exceeds ResizeFactor var.