Filters
Question type

Show the BST after deleting 60 from the following BST.

Correct Answer

verifed

verified

The ________ is to visit the left subtree of the current node first, then the current node itself, and finally the right subtree of the current node.


A) postorder traversal
B) preorder traversal
C) inorder traversal
D) breadth-first traversal

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

To add a new node, you need to start a process by first placing it as _______ and move it up to maintain the heap property.


A) the last node in the heap
B) the new root
C) the right child of the root
D) the left child of the root

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

A

A ____ is an edge that links a vertex to itself.


A) loop
B) parallel edge
C) weighted edge
D) directed edge

E) A) and B)
F) A) and D)

Correct Answer

verifed

verified

Find a MST in the following graph.

Correct Answer

verifed

verified

The time complexity for finding an element in a binary search tree is _________.


A) O(logn)
B) O(nlogn)
C) O(n)
D) O(1)

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

A ___________ of a graph is a subgraph that is a tree and connects all vertices in the graph.


A) spanning tree
B) shorted path

C) A) and B)
D) undefined

Correct Answer

verifed

verified

A

A _________ is the one in which every two pairs of vertices are connected.


A) complete graph
B) weighted graph
C) directed graph

D) All of the above
E) B) and C)

Correct Answer

verifed

verified

A graph may have several minimum spanning tree.


A) true
B) false

C) A) and B)
D) undefined

Correct Answer

verifed

verified

If two vertices are connected by two or more edges, these edges are called ______.


A) loop
B) parallel edge
C) weighted edge
D) directed edge

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

Find all shortest paths starting from vertex A in the following graph.

Correct Answer

verifed

verified

11eb4b5d_ea1d_4349_9bf3_13d865a7fcc7_TB2835_00

Show the BST after inserting 45, 43, 100, 34, 23, and 3 into an empty BST.

Correct Answer

verifed

verified

Show the BST after deleting 15 from the following BST.

Correct Answer

verifed

verified

Draw a BFS tree from the following graph starting from vertex E.

Correct Answer

verifed

verified

Show the inorder, preorder, and postorder of the following BST. Show the inorder, preorder, and postorder of the following BST.

Correct Answer

verifed

verified

The time complexity of the DFS algorithm is The time complexity of the DFS algorithm is   A)  true B)  false


A) true
B) false

C) A) and B)
D) undefined

Correct Answer

verifed

verified

Draw a DFS tree from the following graph starting from vertex E.

Correct Answer

verifed

verified

(The answe...

View Answer

Showing 1 - 17 of 17

Related Exams

Show Answer