Data
Operations
Both of the above
None of the above
D. None of the 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
Data
Operations
Both of the above
None of the above
Arrays
Records
Pointers
None
floor address
foundation address
first address
base address
for relatively permanent collections of data
for the size of the structure and the data in the structure are constantly changing
for both of above situation
for none of above situation
internal change
inter-module change
side effect
side-module update
LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array
LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array
LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array
None of above
O(n)
O(log n)
O(n2)
O(n log n)
O(n)
O(log )
O(n2)
O(n log n)
11
12
13
14
Queue
Stack
List
None of the above
An array is suitable for homogeneous data but the data items in a record may have different data type
In a record, there may not be a natural ordering in opposed to linear array.
A record form a hierarchical structure but a linear array does not
All of above
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
O(n)
O(log n)
O(n2)
O(n log n)
array
lists
stacks
all of above
Trees
Graphs
Arrays
None of above
16
12
6
10
O(n)
O(log n)
O(n2)
O(n log n)
Binary search
Insertion sort
Radix sort
Polynomial manipulation
Stacks
Dequeues
Queues
Binary search tree
Tree
Graph
Priority
Dequeue
List
Stacks
Trees
Strings
Arrays
Linked lists
Both of above
None of above
linear arrays
linked lists
both of above
none of above
Application level
Abstract level
Implementation level
All of the above
mn
max(m,n)
min(m,n)
m+n-1
Graphs
Binary tree
Stacks
Queues
tables arrays
matrix arrays
both of above
none of above
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.
3 additions and 2 deletions
2 deletions and 3 additions
3 deletions and 4 additions
3 deletions and 3 additions