Feedback your answer is correct question 4 correct

This preview shows page 2 - 5 out of 5 pages.

FeedbackYour answer is correct.Question4CorrectMark 1.00 out of 1.00Flag questionQuestion textA binary search cannot be applied to a tree.Select one:TrueFalse
Question5CorrectMark 1.00 out of 1.00Flag questionQuestion textA binary tree is a tree in which each node can have zero, one, or two children.
Select one:
Question6CorrectMark 1.00 out of 1.00Flag questionQuestion textThe following algorithm is a count-controlled loop going from 1 through 5. Ateach iteration, the loop counter is either printed or put on a queue depending onthe result of Boolean functionRanFun(). (The behavior ofRanFun()immaterial.) At the end of the loop, the items on the queue are dequeued andprinted. Because of the logical properties of a queue, this algorithm cannotprint certain sequences of the values of the loop counter. You are given anoutput and asked if the algorithm could generate the output.Set count to 0WHILE (count < 5)Set count to count + 1IF (RanFun())Write count, ' 'ELSEEnqueue(myQueue, count)WHILE (NOT IsEmpty(myQueue))Dequeue(myQueue, number)Write number, ' 'The following output is possible using a queue: 1 3 5 4 2Select one:is
Question7CorrectMark 1.00 out of 1.00
Flag questionQuestion textA stack displays FIFO behavior.Select one:
Question8IncorrectMark 0.00 out of 1.00Flag questionQuestion textWhat is written by the following algorithm?Enqueue(myQueue, 5)Enqueue(myQueue, 4)Enqueue(myQueue, 4)Dequeue(myQueue, item)Dequeue(myQueue, item)Enqueue(myQueue, item)WHILE (NOT IsEmpty(myQueue))Dequeue(myQueue, item)Write item, ' '4.4Answer:
Question9CorrectMark 1.00 out of 1.00Flag questionQuestion text
Indicate which structure would be a more suitable choice for each of thefollowing applications.A word processor to have a PF key that causes the preceding command to beredisplayed. Every time the PF key is pressed, the program is to show thecommand that preceded the one currently displayedSelect one:
FeedbackYour answer is correct.Question10CorrectMark 1.00 out of 1.00Flag questionQuestion textIn a graph, the vertices represent the items being modeled.Select one:
End of preview. Want to read all 5 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
N/A
Tags
Graph Theory, Array data structure

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture