Analysis of Algorithms and Computational Complexity Questions and Answers

Practice Mode
Showing 10 of 239 questions
Q221
Sparse matrices have
  • A many zero entries
  • B many non-zero entries
  • C higher dimension
  • D none of these
Answer: Option A
Q222
In which of the following cases, linked list implementation of sparse matrices consumes the same memory space as the conventional way. of storing the entire array ?
  • A 5 * 6 matrix with 9 non-zero entries
  • B 5 * 6 matrix with 8 non-zero entries
  • C efficient in accessing an entry
  • D efficient if the sparse matrix is a band matrix
Answer: Option C
Q223
The average search time of hashing, with linear probing will be less if the load factor
  • A is far less than one
  • B equals one
  • C is far greater than one
  • D none of these
Answer: Option A
Q224
A hash table can store a maximum of 10 records. Currently there are records inn location 1, 3, 4, 7, 8, 9, 10. The probability of a new record going into location 2, with a hash function resolving collisions by linear probing is
  • A 0.6
  • B 0.1
  • C 0.2
  • D 0.5
Answer: Option A
Q225
Consider a hashing function that resolves collision by quadratic probing. Assume the address space is indexed fron 1 to 8. If a collision occurs at position 4, then the location which will never be probed is
  • A 4
  • B 5
  • C 8
  • D 2
Answer: Option D
Q226
A hash table has space for 100 records. then the probability of collision before the table is 10% full, is
  • A 0.45
  • B 0.5
  • C 0.3
  • D 0.34 (approximately)
Answer: Option A
Q227
Trie Indexing
  • A is efficient in dealing with strings of variables length
  • B has the number of disk accesses can't exceed the length of the particular string that is searched
  • C can handle insertions and deletions, dynamically and efficiently
  • D all of these
Answer: Option D
Q228
Stacks can't be used to
  • A evaluate an arithmetic expression in postfix
  • B implement recursion
  • C convert a given arithmetic expression in infix form to its equivalent postfix form
  • D allocate resources (like CPU) by the operating system
Answer: Option D
Q229
The way a card game player arranges his cards as he picks them up one by one, is an example of
  • A bubble sort
  • B selection sort
  • C insertion sort
  • D merge sort
Answer: Option C
Q230
The average number of comparison performed by the merge sort algorithm, in merging two sorted lists of length 2 is
  • A 8/3
  • B 8/5
  • C 11/7
  • D 11/6
Answer: Option A
Questions and Answers for Competitive Exams Various Entrance Test