Deck 5: Methods

ملء الشاشة (f)
exit full mode
سؤال
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
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
Show the inorder, preorder, and postorder of the following BST. Show the inorder, preorder, and postorder of the following BST.  <div style=padding-top: 35px>
سؤال
A _________ is the one in which every two pairs of vertices are connected.

A) complete graph
B) weighted graph
C) directed graph
سؤال
Show the BST after deleting 15 from the following BST.
سؤال
Find all shortest paths starting from vertex A in the following graph.
سؤال
Show the BST after inserting 45, 43, 100, 34, 23, and 3 into an empty BST.
سؤال
Show the BST after deleting 60 from the following BST.
سؤال
The time complexity of the DFS algorithm is <strong>The time complexity of the DFS algorithm is  </strong> A) true B) false <div style=padding-top: 35px>

A) true
B) false
سؤال
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
سؤال
A ___________ of a graph is a subgraph that is a tree and connects all vertices in the graph.

A) spanning tree
B) shorted path
سؤال
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
سؤال
A ____ is an edge that links a vertex to itself.

A) loop
B) parallel edge
C) weighted edge
D) directed edge
سؤال
Draw a DFS tree from the following graph starting from vertex E.
سؤال
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)
سؤال
A graph may have several minimum spanning tree.

A) true
B) false
سؤال
Draw a BFS tree from the following graph starting from vertex E.
سؤال
Find a MST in the following graph.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/17
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 5: Methods
1
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
A
2
Show the inorder, preorder, and postorder of the following BST. Show the inorder, preorder, and postorder of the following BST.
3
A _________ is the one in which every two pairs of vertices are connected.

A) complete graph
B) weighted graph
C) directed graph
A
4
Show the BST after deleting 15 from the following BST.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
5
Find all shortest paths starting from vertex A in the following graph.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
6
Show the BST after inserting 45, 43, 100, 34, 23, and 3 into an empty BST.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
7
Show the BST after deleting 60 from the following BST.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
8
The time complexity of the DFS algorithm is <strong>The time complexity of the DFS algorithm is  </strong> A) true B) false

A) true
B) false
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
9
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
10
A ___________ of a graph is a subgraph that is a tree and connects all vertices in the graph.

A) spanning tree
B) shorted path
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
11
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
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
12
A ____ is an edge that links a vertex to itself.

A) loop
B) parallel edge
C) weighted edge
D) directed edge
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
13
Draw a DFS tree from the following graph starting from vertex E.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
14
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)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
15
A graph may have several minimum spanning tree.

A) true
B) false
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
16
Draw a BFS tree from the following graph starting from vertex E.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
17
Find a MST in the following graph.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 17 في هذه المجموعة.