Saturday, May 1, 2010
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
Answer: Mergesort always makes recursive calls to sort subarrays that are about half size of the original array, resulting in O(n log n) time.
What is the difference between an external iterator and an internal iterator? Describe an advantage of an external iterator.
Ans
An internal iterator is implemented with member functions of the class that has items to step through. .An external iterator is implemented as a separate class that can be "attach" to the object that has items to step through. .An external iterator has the advantage that many difference iterators can be active simultaneously on the same object.
An internal iterator is implemented with member functions of the class that has items to step through. .An external iterator is implemented as a separate class that can be "attach" to the object that has items to step through. .An external iterator has the advantage that many difference iterators can be active simultaneously on the same object.
What are the advantages and disadvantages of B-star trees over Binary trees?
Ans
A1 B-star trees have better data structure and are faster in search than Binary trees, but it’s harder to write codes for B-start trees.
A1 B-star trees have better data structure and are faster in search than Binary trees, but it’s harder to write codes for B-start trees.
Subscribe to:
Posts (Atom)
