Bangladesh University of Professionals
CSE 111
1. Suppose that items A, B, C, D and E are pushed, in that order, onto an initially empty stack S. S is then popped four times; as each item is popped off, it is inserted into an initially empty queue. If two items are then removed from the queue, what is the next item that will be removed from the queue? A. item A B. item B C. i
...[Show More]
1. Suppose that items A, B, C, D and E are pushed, in that order, onto an initially empty stack S. S is then popped four times; as each item is popped off, it is inserted into an initially empty queue. If two items are then removed from the queue, what is the next item that will be removed from the queue? A. item A B. item B C. item C D. item D E. item E 2. If the binary tree below is printed by a preorder traversal, what will the result be? A. 9 4 17 16 12 11 6 B. 9 17 6 4 16 22 12 C. 6 9 17 4 16 22 12 D. 6 17 22 9 4 16 12 E. 6 17 9 4 22 16 12 3. A graph implementation that uses a two-dimensional array to represent the edges would be most reasonable for which of the following cases? A. 1000 nodes, 1200 edges B. 100 nodes, 4000 edges C. 1000 nodes, 10000 edges D. 10 nodes, 20 edges E. none of these, since a graph can only be represented by a linked structure.
[Show Less]