Suppose we need to write an efficient program to store N employee records for ABC Inc where each employee record is identified by unique employee id. Consider the following ways to store the records. 1. An array list sorted by employee id 2. A linked list sorted by employee id 3. A linked list not sorted 4. A balanced binary search tree with employee id as key For data structure 1 -4, what is the average time to find an employee record given employee id as a key? a. O(log N), O(N), O(N), O(log N) O(N), O(log N), O(N), O(1) c. O(log N), O(log N), O(N), O(log N) d. O(log N), O(log N), O(log N), O(1) e. O(log N), O(log N), O(N), O(1)
Suppose we need to write an efficient program to store N employee records for ABC Inc where each employee record is identified by unique employee id. Consider the following ways to store the records. 1. An array list sorted by employee id 2. A linked list sorted by employee id 3. A linked list not sorted 4. A balanced binary search tree with employee id as key For data structure 1 -4, what is the average time to find an employee record given employee id as a key? a. O(log N), O(N), O(N), O(log N) O(N), O(log N), O(N), O(1) c. O(log N), O(log N), O(N), O(log N) d. O(log N), O(log N), O(log N), O(1) e. O(log N), O(log N), O(N), O(1)
Related questions
Question
I was told the answer is O(log N), O(N), O(N), O(log N) but I am not sure
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps