Create a Java program that adds the numbers 1 through 50 to a stack called stack1.
Then perform the following:
[Note: Provide a screenshot of your code output].
Consider the following initial state of a queue implemented using a circular array. Where F for “front” and B for “back” are shown on the queue.
101 | 102 | ||||||||
F | B |
Answer the following:
Write the pre-order, in-order and post-order traversals of the following binary search tree:
Draw the binary search tree if the pre-order traversals of that binary search tree is given as below:
Pre-order traversal: 7, 4, 2, 3, 6, 5, 12, 9, 8, 11, 19, 15, 20