id
stringlengths
11
11
question
stringclasses
79 values
instructor_answer
stringclasses
80 values
student_answer
stringlengths
1
959
score_grader_1
float32
0
10
score_grader_2
float32
0
10
score_avg
float32
0
5
E12.Q08.A11
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
go to the bottom of the left sub tree and visit the parent and then its children
7.5
4
3
E12.Q08.A12
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
The Euler tour traverses through the tree in a rubber-band style shape.
6
7
3.5
E12.Q08.A13
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
The Euler tour traversal of a tree is a specific way of navigating a tree that involves following the tree starting at the very top and moving along the left side of the tree first, cupping in to visit the parents of children nodes. It allows for each node to be visited from the left, the right and the bottom.<br><br>The Euler tour first progresses to a left child if there is one, then progresses to it's parent, then it's next child, then it's parent's parent.
7.5
10
4.5
E12.Q08.A14
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
it runs through the parents and the children in order
6
5
3
E12.Q08.A15
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
it starts node on the left of the root and then proceeds to visits each node in a left to right order, visits the root, and then proceeds to repeat the previous step on the right side of the tree.
7.5
5
3.5
E12.Q08.A16
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
Travel from the root to the farthest left child<br>Backup, travel the leftmost children in the right side<br>repeat until reaching the rightmost child.
10
7
4.5
E12.Q08.A17
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
has preorder, in order, and postorder of a tree. preorder = puts the parent node in front of the child node(s). in order = puts the parent node between the left child and right child node(s). postorder = puts the parent node after the child node(s).
7.5
5
3.5
E12.Q08.A18
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
The Euler traveral is when you go through a tree looking for nodes to put in the order of left, root, right. Like inOrder traversal.
10
5
4
E12.Q08.A19
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
An Euler traversal is a traversal that begins with the root, and travels around the outside of the tree. Each element in the tree is visited 3 times. From the left, from the bottom and from the right.
10
10
5
E12.Q08.A20
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
Euler tour traversal of a tree traverses down each branch straight to one leaf then starts again at the root and repeats until all elements have been traversed.
7.5
8
4
E12.Q08.A21
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
The Euler tour visits every node in a tree, starting with the root and working around the tree counterclockwise. in-order, post-order, and pre-order traversals can be seen as variations of the Euler tour traversal.
9
8
4.5
E12.Q08.A22
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
not answered
0
0
0
E12.Q08.A23
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
to traverse going down to the left then go to the right of last children and back to the top.. kind of like going around the tree
9
10
5
E12.Q08.A24
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
You recursively visit every node on the list. You visit the node from the left, the bottom, and from the right.
10
10
5
E12.Q08.A25
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
the euler tour is a way to traverse a tree where you come into contact with each node three times, from the left, from the right, and from the bottom
10
10
5
E12.Q08.A26
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
traversing a tree level by level
6
0
1.5
E12.Q08.A27
What is the Euler tour traversal of a tree?
A walk around the tree, starting with the root, where each node is seen three times: from the left, from below, from the right.
The Euler traversal through the tree in a rubber band style shape.
6
7
3.5
E12.Q09.A00
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
if root, set root to NULL<br>else if deleting right leaf, set rightPtr of parent node to NULL<br>else if deleting left leaf, set leftPtr of parent node to NULL<br>else if deleting a left or right subtree child node, set the max leaf child in the left subtree as the new child node.
8
9
4.5
E12.Q09.A01
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
Traverse the tree and find the node, if the node has no children, simply delete it; otherwise set the node's data equal to the data of one of its children then set the pointer for that child to NULL.
7.5
6
3.5
E12.Q09.A02
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
first attaching the elements from the node to be deleting to alternate nodes and then deleting that node. <br><br>delete node;
7.5
6
3.5
E12.Q09.A03
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
If you delete a node from a tree, you have to link that nodes parents to the children of that node.
7.5
5
3.5
E12.Q09.A04
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
Must delete the information that the node contains (to free up memory/ "garbage collect") and also delete the pointer (in that node's "parent") that points to the node you wish to delete.
6
1
2
E12.Q09.A05
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
you replace the node with the largest element of its left subtree or replace it with the smallest element of the right subtree.
10
10
5
E12.Q09.A06
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
You traverse the tree till you find the node you are wanting to delete. If the node has no children you delete it. If the node has children, before you delete, you find the left-most of its children and attach it to the root then you can delete the node.
8.5
7
4
E12.Q09.A07
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
Link the to-be-deleted's left child to the to-be-deleted's parent's left child pointer.
10
7
4.5
E12.Q09.A08
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
The way you delete a node from a binary search tree is first you have take the root and then see the nodes that are coming from the root. And delete the nodes and set the root to NULL.
7.5
0
2
E12.Q09.A09
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
You remove the element from the tree and move the next highest element from the left into its place.
7.5
10
4.5
E12.Q09.A10
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
delete node;
6
0
1.5
E12.Q09.A11
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
the deletion of a node depends upon if it has children and if it is an AVL binary search tree. Assuming it is not an AVL tree, and the node being deleted has no children, you just set its pointer to null. If it has a left child or a right child exclusively, that child replaces the deleted node, if it has two children, the left most child of the right sub tree (or right most child of the left subtree)will replace it
10
10
5
E12.Q09.A12
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
If the node is a leaf, just set it's parent's pointer to null and delete it, if it has a single child, set the parent's pointer to the child and delete; if it has two children, set the node to one of the middle children and remove that child from its previous position as a leaf (rightmost child of the left subtree or leftmost child of the right subtree).
10
10
5
E12.Q09.A13
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
In a binary search tree, you must first establish a proper replacement for the node you are about to delete, usually a child from the soon to be deleted node. Once that replacement node has been found, you simply reassign it to where the node that is going to be deleted is. After the deleted node has been usurped, you remove the deleted node from memory so it may be used again.<br>
7.5
8
4
E12.Q09.A14
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
It all depends on where the node is located. If its a child it can just be deleted but for a node inside the tree it must be replaced with another node that works in its place.
7.5
6
3.5
E12.Q09.A15
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
if the node has no children, delete it right away, otherwise, put either the furthest right node on the left side or the furthest left node on the right side in that place and perform a the above on that node to guarantee that it's children get handled properly.
10
10
5
E12.Q09.A16
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
Create a temp Node<br><br>Set temp's values to the Node after head <br>or NULL in the case of only head Node in the list. <br><br>Set head equal to temp.<br>Delete temp<br>
7.5
0
2
E12.Q09.A17
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
by searching down the tree until you find the node, and replacing the link to that node with the greatest child node on the left subtree or the least child node on the right subtree.
8.5
10
4.5
E12.Q09.A18
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
Set the nodes to NULL, where that it doesn't point to anything, and the use the DELETE opertator to clear space from memory.
6
0
1.5
E12.Q09.A19
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
You must first traverse the tree to find the appropriate value. Then you must make sure that the node is a leaf node. If it is, then you can delete the pointer to that specific node.
7.5
3
3
E12.Q09.A20
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
if the node is a leaf, you set it's parent's pointer to null.<br>if the node is in the tree you must replace the node with one in the tree:<br>either the largest in the left of the tree or the smallest in the right of the tree.<br>this can be done recursively if needed.
10
10
5
E12.Q09.A21
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
if the node is a leaf it can simply be deallocated/deleted from memory, and its parent's reference to it changed to NULL. If the node has a single child, the pointer to it should be made to point to its child before deleting the node. Should the node have two children, the easiest solution may be to copy the node's entire subtree to a new array or tree, delete the node and all descendants, then add the elements taken from the subtree back into the main tree.
9
8
4.5
E12.Q09.A22
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
not answered
0
0
0
E12.Q09.A23
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
you cannot delete a node because that can cause a node to have more than 2 children
5
0
1.5
E12.Q09.A24
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
You search the tree for the node using recursion. When you find the node, you determine whether it is a leaf or a internal node. If it is a leaf, you just delete it and set the parent pointer to that node to NULL. If it is a node, you replace the node with either of the children nodes.
7.5
7
4
E12.Q09.A25
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
to delete the node, you would have to link the children nodes that are connected to the node to be deleted to the remaining nodes of the tree in such a way that nodes on the right of the parent node are larger than the parent and nodes on the left of the parent node are smaller
10
6
4
E12.Q09.A26
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
if it has no children, you just delete it. if it only has one child, just replace the node with whichever child it has. if it has both children, replace it with one of its children, and send the other child down along the other side of the new node.
7.5
7
4
E12.Q09.A27
How do you delete a node from a binary search tree?
Find the node, then replace it with the leftmost node from its right subtree (or the rightmost node from its left subtree).
pointer to the child and delete it has 2 children set the node to the child and delete it. the node to th middle will then take its place
7.5
4
3
E12.Q10.A00
How many steps does it take to search a node in a binary search tree?
The height of the tree.
Log(n) where n is the number of nodes.
10
9
5
E12.Q10.A01
How many steps does it take to search a node in a binary search tree?
The height of the tree.
log(n) steps
10
9
5
E12.Q10.A02
How many steps does it take to search a node in a binary search tree?
The height of the tree.
The number of levels and the height of the tree
10
10
5
E12.Q10.A03
How many steps does it take to search a node in a binary search tree?
The height of the tree.
It is the same as the height of the tree.
10
10
5
E12.Q10.A04
How many steps does it take to search a node in a binary search tree?
The height of the tree.
Given n elements, it would take n/2 steps to find the search criteria.
6
0
1.5
E12.Q10.A05
How many steps does it take to search a node in a binary search tree?
The height of the tree.
log n
10
9
5
E12.Q10.A06
How many steps does it take to search a node in a binary search tree?
The height of the tree.
Depends on the location of the node you are looking for. If it is the root it is one step. <br>else<br>If it is smaller than the current you are on node you go to the left. If it is larger than the current node you are on go to the right.
7.5
0
2
E12.Q10.A07
How many steps does it take to search a node in a binary search tree?
The height of the tree.
2^n where n is the # of levels the binary tree has
7.5
0
2
E12.Q10.A08
How many steps does it take to search a node in a binary search tree?
The height of the tree.
The number of steps to search a node is the function n-1.
8
5
3.5
E12.Q10.A09
How many steps does it take to search a node in a binary search tree?
The height of the tree.
It would take n/2 elements, given n.
6
0
1.5
E12.Q10.A10
How many steps does it take to search a node in a binary search tree?
The height of the tree.
log(n)
10
9
5
E12.Q10.A11
How many steps does it take to search a node in a binary search tree?
The height of the tree.
O(log n)
10
9
5
E12.Q10.A12
How many steps does it take to search a node in a binary search tree?
The height of the tree.
O( Log (n) )
10
9
5
E12.Q10.A13
How many steps does it take to search a node in a binary search tree?
The height of the tree.
If the binary search tree is constructed efficiently, best case scenario is O(log n) time. Where n is the number of items in the tree.<br><br>If the binary search tree is constructed poorly, with for instance the root of the tree being 1, and progressing downwards and to the right its children are each more than the last: you have a one-way linear linked list. That worse case scenario would be a full traversal at O(n) time. Where n is the number of items in the tree.
10
10
5
E12.Q10.A14
How many steps does it take to search a node in a binary search tree?
The height of the tree.
N, n being the number of nodes.
10
5
4
E12.Q10.A15
How many steps does it take to search a node in a binary search tree?
The height of the tree.
depending on the way that the tree is ordered, it could be anywhere between log(n) and N steps.
10
10
5
E12.Q10.A16
How many steps does it take to search a node in a binary search tree?
The height of the tree.
log(n)
10
9
5
E12.Q10.A17
How many steps does it take to search a node in a binary search tree?
The height of the tree.
worst case scenario = the number of levels of the tree, ie: the node at the farthest position from the root node. best case = 1 step if its the root node.
10
10
5
E12.Q10.A18
How many steps does it take to search a node in a binary search tree?
The height of the tree.
3 steps at most. There are 3 cases.
6
0
1.5
E12.Q10.A19
How many steps does it take to search a node in a binary search tree?
The height of the tree.
log(n) where n equals the total number of nodes in the tree.
10
9
5
E12.Q10.A20
How many steps does it take to search a node in a binary search tree?
The height of the tree.
the same number of steps as the number of levels or generations in the tree
10
10
5
E12.Q10.A21
How many steps does it take to search a node in a binary search tree?
The height of the tree.
to find a node in a binary search tree takes at most the same number of steps as there are levels of the tree.
10
10
5
E12.Q10.A22
How many steps does it take to search a node in a binary search tree?
The height of the tree.
three steps<br>visit the root node, then go to right subtree, after visiting right subtree visit left subtree
9
0
2.5
E12.Q10.A23
How many steps does it take to search a node in a binary search tree?
The height of the tree.
log n
10
9
5
E12.Q10.A24
How many steps does it take to search a node in a binary search tree?
The height of the tree.
( n(n-1) ) / 2<br><br>
6
0
1.5
E12.Q10.A25
How many steps does it take to search a node in a binary search tree?
The height of the tree.
2n-1
9.5
0
2.5
E12.Q10.A26
How many steps does it take to search a node in a binary search tree?
The height of the tree.
it takes at most h steps, where h is the height of the tree.
10
10
5
E12.Q10.A27
How many steps does it take to search a node in a binary search tree?
The height of the tree.
it depends on the install search tree then from there for whatever the case is the it repeats it back along the case of the primary node
6
0
1.5