Mastering C++: A Step by Step Guide for the Beginner and Advanced User, Including 26 Quizzes and 120+ Questions by White Michael B

Mastering C++: A Step by Step Guide for the Beginner and Advanced User, Including 26 Quizzes and 120+ Questions by White Michael B

Author:White, Michael B. [White, Michael B.]
Language: eng
Format: azw
Published: 2019-06-09T16:00:00+00:00


Quiz 15

Name the binary tree’s primary virtue

A. It uses pointers

B. Arbitrary amounts of data can be stored in it

C. It lets you do fast data lookups

D. You can easily remove from the binary tree

When would a linked list be better than a binary tree?

A. When data needs to be maintained in a way that makes it easy to do fast lookups

B. When you want access to the elements in sorted order

C. When you need to have the ability to add to the front or end quickly without ever accessing the middle items.

D. When you don’t need to free up the memory in use

Which of these is true?

A. You can change the structure of a tree by changing the order you add items

B. Items should be inserted in a binary tree in sorted order for the best structure

C. linked lists are faster than binary trees for locating elements if the elements have been inserted in random order

D. Binary trees cannot be reduced to having a structure like a linked list.

Which of the following is the right way of describing why a binary tree can find nodes so fast?

A. They are not that fast; two pointers means more work needs to be done in traversing the tree

B. Each node has a pair of sub-trees whose creation is based on whether the items in them are of lesser or greater value than the current node’s value

C. They are no better than a linked list

D. A recursive call on a binary tree is faster than a loop over a linked list



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.