Data Structure and Algorithm Analysis Set 23

Data Structure and Algorithm Analysis

Questions 221 to 230



221.
In linked list, a node contains atleast
(a)
Node address field, data field
(b)
Node number, data field
(c)
Next address field, information field
(d)
Node number, information field
(e)
Node address field, information field.
222.
Which of the following is the correct big-O expression for 1 + 2 + 3 + ... + n?
(a)
O(log n)
(b)
O(n)
(c)
O(n log n)
(d)
O(n²)
(e)
O(2n).
223.
A B-tree of order n is also called
 (a)
(n–n) –1 tree
(b)
n–(n–2) tree
(c)
(n–1)–n tree
(d)
n–(n–1) tree
(e)
n–1 tree.
224.
The minimum number of keys contained in each non root node of a B-tree of order 11 are
(a)
4
(b)
5
(c)
3
(d)
2
(e)
6.
225.
Row-major order in two dimensional array refers to
(a)
All elements of a row are stored in memory in sequence followed by next row in sequence and so on
(b)
All elements in the sorted order according to their column sequence
(c)
All elements of a column in sequence and so on
(d)
All elements in the sorted order according to their row sequence
(e)
All elements of a row are stored in memory in sequence followed by next column in sequence and so on.
226.
Null pointer is used to define
I.     End of linked list.
II.    Empty pointer field of a structure.
III.   The linked list is empty.
(a)
Only (I) above
(b)
Only (II) above
(c)
Only (III) above
(d)
Both (I) and (II) above
(e)
All (I), (II) and (III) above.
227.
Direct or random access of element is not possible in
(a)
Linked list
(b)
Array
(c)
String
(d)
Queue
(e)
Double linked list.
228.
“Get a node, store new element and insert the new node at the top” refers to insert operation in non empty
(a)
Stack
(b)
Queue
(c)
Array
(d)
Linked list
(e)
Tree.
229.
A technique which collects all deleted spaces onto free storage list is called
(a)
Static memory allocation
(b)
Garbage collection
(c)
Calloc
(d)
Dynamic memory allocation
(e)
Malloc.
230.
datatype  *s;
datatype  *p;
datatype  *i;
p = malloc(100); t=p; s=p+ (100/size of (datatype))-sizeof (datatype);
Func(datatype j )
{ if (p > s) {printf (“overflow/n”); return:}
*p= j; p++;}
is referring to
(a)
Push operation of stack
(b)
Pop operation of stack
(c)
Push operation of queue
(d)
Pop operation of queue           
(e)
Push and pop of the stack.




Answers



221.
Answer : (c)
Reason  :       next address field, information field.
222.
Answer : (d)
Reason  :       O(n²)
223.
Answer : (c)
Reason  :       (n-1)-n tree
224.
Answer : (b)
Reason  :       5
225.
Answer : (a)
Reason  :       all elements of a row are stored in memory in sequence followed by next row in sequence and so on.
226.
Answer : (e)
Reason  :       (I), (II), (III) are correct
227.
Answer : (c)
Reason  :       string
228.
Answer : (a)
Reason  :       stack
229.
Answer : (b)
Reason  :       Garbage collection
230.
Answer : (a)
Reason  :       push operation of stack





No comments :

What you think about these Questions and Answers ? Let me know in comments.

Post a Comment