Binary Search Trees
Binary Search Trees 1: Introduction
questions1 = [
{
time: "1:41",
question: "Time to access an element",
answers: [ ],
correct: "Continue when ready"
},
{
time: "2:01",
question: "Time to search for an element",
answers: [ ],
correct: "Continue when ready"
},
{
time: "2:44",
question: "Time to find the ith order statistic?",
answers: [ ],
correct: "Continue when ready"
},
{
time: "3:43",
question: "Time to find the predecessor and/or successor?",
answers: [ ],
correct: "Continue when ready"
},
{
time: "4:01",
question: "Time to find access all elements.",
answers: [ ],
correct: "Continue when ready"
},
{
time: "4:27",
question: "Time to insert an element.",
answers: [ ],
correct: "Continue when ready"
},
{
time: "5:02",
question: "Time to insert extract the minimum or maximum element.",
answers: [ ],
correct: "Continue when ready"
},
]
yt1 = new YtQuiz("0lmKuGDDKj4", questions1);
yt1.html();
Binary Search Trees 2: BST Properties
Binary Search Trees 3: BST Operations and Tree Height
questions3 = [
{
time: "0:52",
question: "Time to access an element",
answers: [ ],
correct: "Continue when ready"
},
{
time: "1:30",
question: "Time to find the ith order statistic?",
answers: [ ],
correct: "Continue when ready"
},
{
time: "2:00",
question: "Time to find access all elements.",
answers: [ ],
correct: "Continue when ready"
},
{
time: "2:24",
question: "Time to insert an element.",
answers: [ ],
correct: "Continue when ready"
},
{
time: "3:07",
question: "Time to insert extract the minimum or maximum element.",
answers: [ ],
correct: "Continue when ready"
},
{
time: "3:58",
question: "Are both trees valid?",
answers: [
"Yes",
"No",
],
correct: 1
},
{
time: "4:26",
question: "What is the height of each tree?",
answers: [
"3 and 4",
"3 and 3",
"5 and 5",
],
correct: 0
},
{
time: "4:42",
question: "Which tree is 'better'?",
answers: [
"Left",
"Right",
],
correct: 0
},
{
time: "5:48",
question: "What is the maximum height of a tree with n nodes?",
answers: [ ],
correct: "The maximum height is n"
},
{
time: "6:21",
question: "What is the minimum height of a tree with n nodes?",
answers: [ ],
correct: "The minimum height is lg(n)"
},
]
yt3 = new YtQuiz("aLCat9-8tUI", questions3);
yt3.html();
Binary Search Trees 4: Search a BST
Binary Search Trees 5: BST Exercise
Binary Search Trees 6: BST Traversals
questions6 = [
{
time: "0:22",
question: "Continue when ready",
answers: [ ],
correct: "Continue when ready"
},
{
time: "5:31",
question: "What kind of traversal is shown in the function?",
answers: [
"Pre-order",
"In-order",
"Post-order",
],
correct: 0
}
]
yt6 = new YtQuiz("Z4a1810yEvk", questions6);
yt6.html();
Binary Search Trees 7: The Selection Problem
questions7 = [
{
time: "1:06",
question: "What kind of traversal to computer the size of each node?",
answers: [
"Pre-order",
"In-order",
"Post-order",
],
correct: 2
},
{
time: "3:22",
question: "Continue when ready",
answers: [ ],
correct: "Continue when ready"
},
{
time: "6:05",
question: "Why do we need to compute a new value for i when we recursively search to the right?",
answers: [ ],
correct: "We must ignore all elements in the current nodes left subtree."
},
]
yt7 = new YtQuiz("zVGATRwlfa0", questions7);
yt7.html();