Data Structure and Algorithm Analysis Set 24

Data Structure and Algorithm Analysis

Questions 231 to 240



231.
malloc() returns pointer to
(a)
Integer
(b)
Structure
(c)
Character
(d)
Boolean
(e)
Float.
232.
If a binary tree is threaded for an in order traversal order, a NULL right link of any node is replaced by the address of its
(a)
Successor
(b)
Predecessor
(c)
Root
(d)
Postdecessor
(e)
None of these.
233.
If graph G has no edges then corresponding adjacency matrix is
(a)
Unit matrix
(b)
Zero matrix
(c)
Matrix with all 1’s
(d)
Diagonal matrix
(e)
Upper diagonal matrix.
234.
Worst case efficiency of binary search is
(a)
log2 n + 1
(b)
n
(c)
N2
(d)
2n
(e)
log n.
235.
The property that is not expected from good hashing technique should
(a)
Produce keys uniformly distributed over the range
(b)
Easy to program
(c)
Produce no collisions
(d)
Produces collisions
(e)
All above properties are expected.
236.
Graph structure is available in
(a)
C
(b)
C++
(c)
Pascal
(d)
Java
(e)
Data structures.
237.
The element at the root of heap is
(a)
Largest
(b)
Smallest
(c)
Depending on type of heap it may be smallest or largest
(d)
Fixed
(e)
Unlimited.
238.
Worst case efficiency of which search is O(n)?
(a)
Sequential search
(b)
Binary search
(c)
Indexed search
(d)
Hashing
(e)
Depth first search.
239.
Breadth first search
(a)
Scans all incident edges before moving to other vertex
(b)
Scans adjacent unvisited vertex as soon as possible
(c)
Is same as backtracking
(d)
Computes a path between two vertices of graph or equivalently reporting that no such path exists
(e)
Scans for cycle in graph, that no such cycle exists.
240.
Which of the following searching methods requires that all keys must reside in internal memory?
(a)
Binary search
(b)
Sequential search
(c)
Hashing
(d)
Depth first search
(e)
Breadth first search.

Answers


231.
Answer : (c)
Reason  :       character
232.
Answer : (a)
Reason  :       successor
233.
Answer : (b)
Reason  :       zero matrix
234.
Answer : (a)
Reason  :       log2 n+1
235.
Answer : (c)
Reason  :       produce no collisions.
236.
Answer : (e)
Reason  :       data structures
237.
Answer : (c)
Reason  :       depending on type of heap it may be smallest or largest
238.
Answer : (a)
Reason  :       Sequential search
239.
Answer : (a)
Reason  :       scans all incident edges before moving to other vertex
240.
Answer : (a)
Reason  :       Binary search





1 comment :