O(n)
O(log n)
O(n2)
O(n log n)
D. O(n log n)
the name of array
the data type of array
the index set of the array
the first data from the set to be stored
Stack
Input restricted dequeue
Priority queues
Output restricted qequeue
Last in first out
First in last out
Last in last out
First in first out
must use a sorted array
requirement of sorted array is expensive when a lot of insertion and deletions are needed
there must be a mechanism to access middle element directly
binary search algorithm is not efficient when the data elements are more than 1000.
Counting microseconds
Counting the number of key operations
Counting the number of statements
Counting the kilobytes of algorithm
floor address
foundation address
first address
base address
P contains the address of an element in DATA.
P points to the address of first element in DATA
P can store only memory addresses
P contain the DATA and the address of DATA
The item is somewhere in the middle of the array
The item is not in the array at all
The item is the last element in the array
The item is the last element in the array or is not there at all
3,4,5,2,1
3,4,5,1,2
5,4,3,1,2
1,5,2,3,4
by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
the architecture of computer memory does not allow arrays to store other than serially
both of above
none of above
Graphs
Binary tree
Stacks
Queues
16
12
6
10
mn
max(m,n)
min(m,n)
m+n-1
Array
Stack
Tree
queue
Much more complicated to analyze than that of worst case
Much more simpler to analyze than that of worst case
Sometimes more complicated and some other times simpler than that of worst case
None or above
grounded header list
circular header list
linked list with header and trailer nodes
none of above
Counting the maximum memory needed by the algorithm
Counting the minimum memory needed by the algorithm
Counting the average memory needed by the algorithm
Counting the maximum disk space needed by the algorithm
tables arrays
matrix arrays
both of above
none of above
11
12
13
14
Stack
Queue
List
Link list
push, pop
insert, delete
pop, push
delete, insert
array
lists
stacks
all of above
Traversal
Search
Sort
None of above
O(n)
O(log )
O(n2)
O(n log n)
underflow
overflow
housefull
saturated
Operations
Algorithms
Storage Structures
None of above
When Item is somewhere in the middle of the array
When Item is not in the array at all
When Item is the last element in the array
When Item is the last element in the array or is not there at all
Best case
Null case
Worst case
Average case
The list must be sorted
there should be the direct access to the middle element in any sublist
There must be mechanism to delete and/or insert elements in list
none of above
sorted linked list
sorted binary trees
sorted linear array
pointer array