Algorithms and Data Structures Midterm
In the asymptotic analysis, the time factor when determining the efficiency of an algorithm is measured by...
Counting the number of primitive operations.
T/F: A doubly linked list structure is worse than a singly linked list if we plan to do a lot of deletions.
False
T/F: A doubly linked list structure is worse than a singly linked list if we plan to do a lot of insertions.
False
T/F: A doubly linked list structure is worse than a singly linked list if we plan to print the entire list frequently.
False
The concept of order (Big O) is important because...
It can be used to decide the best algorithm that solves a given problem, and it determines the maximum size of a problem that can be solved in a given system in a given amount of time.
An algorithm that requires 2n+1 operations to complete its task on n data elements is said to have what kind of running time?
Linear
Arrays, ArrayList, linked lists, stacks, and queues are examples of what kind of data structures?
Linear data structures
Does every problem have an algorithm?
No
Trees, heaps, hash tables, search trees, and graphs are examples of what kind of data structures?
Non-linear data structures
How is the formula (n-1)*(n-5) expressed in terms of Big O notation?
O(n²)
T/F: An array implementation of a queue is more difficult to manage than the array implementation of a stack.
True
Does every algorithm have a Java program?
Yes