Question: vector A = { 5 , 2 1 , 1 9 , 9 5 , 3 1 , 1 2 , 5 3 , 1
vector A i
nsert the elements of A in hash table H of size H is a vector of int is size
Use chaining in case of more than one value.
Draw the table or list the values.
The hash function is the sum of the number ; fn n; initial values are
points insert the numbers from left to right in the original A in a binary search tree BST Do not add a new node for a repeated number. Draw the tree showing the nodes and their values.
points Is the tree in : Balanced? Full? Complete? Perfect?
points List the nodes of the tree when performing an inorder traversal.
points List the nodes of the tree when performing a preorder traversal.
points List the nodes of the tree when performing a postorder traversal.
points If you have an empty stack STK Perform the following operations using elements from array A
STKpushA; STKpushA; STKpushA; STKpop; STKpushA; STKtop; STKtop; STKpushA; STKpushA; STKpop; STKpushA; STKtop; STKtop; STKpushA;
STKpushA; STKpop; STKpushA;
List the elements in the stack STK from top to tail.
List the values of the elements in the stack STK from top to tail. Do not put Ai but values.
points If you have an empty queue QUE. Perform the following operations using elements from array A where enque is add and deque is delete:
QUE.enqueA; QUE.enqueA; QUE.enqueA; QUE.deque; QUE.enqueA; QUE.enqueA; QUE.enqueA; QUE.deque; QUE.enqueA; QUE.enqueA; QUE.enqueA; QUE.deque; QUE.enqueA;
List the values of the elements in the queue QUE from head to tail. Do not put Ai but values.
In this question, do not use A Use the segments listed instead.
points There is a directed graph with vertices and the following directed edges u v means u v:
a b
a e
b c
c d
c e
d h
e d
f e
f g
g h
h f
In these three questions, you can draw or use: a: b c notation instead of drawing.
: points Draw or write the graph
: points Draw or write the adjacency matrix
: points Draw or write the adjacency list
: points DFS trace of the vertices from avertices: points BFS trace of the vertices from avertices
ChatGPT
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
