There are two solutions to the problem of determining the kth element in an unsorted list. We could first sort the list and select the element at location k, or we could create a heap and ____.
A. delete k elements from it, leaving the desired element at the root
B. delete k - 1 elements from it, leaving the desired element at the root
C. delete k + 1 elements from it, leaving the desired element at the root
D. find the element at index k
Answer: B
You might also like to view...
What does a derived class automatically inherit from the base class?
a. instance variables b. static variables c. public methods d. all of the above
Which of the following can be passed to a text string parameter called msg?
A. a text string B. a text string + a number C. a variable + a variable D. all the above
Modify your solution to Exercise 20.8 to determine when the game is over, then prompt the user to determine if they would like to play again. If so, scramble the numbers.
What will be an ideal response?
When a word is selected with a double-click and deleted, both the word and the space after it are deleted
Indicate whether the statement is true or false