Data Structures

Hi,
I am currently working on a data structures assignment and
stuck on AVL tree question.

The scenario is that “There are 10 car makers and each
car maker have from 10 to 1000s models”. I have been asked to work out the
searching efficiency of it. I have to search the model of a car.

My main question is when searching for model. I will have to
search make and then model so is it O(Log M)(make) + O(Log N) (model) =2logn or
log2N? and it is best/average or worst case scenario? I am confused.
Thanks

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.