Home / My courses / UGRD-ITE6201-2223T / MIDTERM EXAMINATION / MIDTERM EXAM
Started on Saturday, 18 March 2023, 2:07 PM
State Finished
Completed on Saturday, 18 March 2023, 2:36 PM
Time taken 28 mins 33 secs
Marks 28.00/40.00
Grade 70.00 out of 100.00
Question 1
Incorrect
Mark 0.00 out of 1.00
It stores elements at the nodes of the tree.
a. tree
b. binary search tree
c. binary tree
d. root
Your answer is incorrect.
Question 2
Incorrect
Mark 0.00 out of 1.00
It returns the parent of the tree.
a. p.parent()
b. parent()
c. root()
d. parent
Your answer is incorrect.
Question 3
Correct
Mark 1.00 out of 1.00
In an undirected graph, edges are drawn using lines.
a. true
b. false
Your answer is correct.
Question 4
Correct
Mark 1.00 out of 1.00
In a tree structure, has a parent element and zero or more children elements.
a. true
b. false
Your answer is correct.
Question 5
Incorrect
Mark 0.00 out of 1.00
It is a pair sets of vertices that connects through edges.
a. none of the above
b. graphs
c. directed graph
d. graph
Your answer is incorrect.
Question 6
Incorrect
Mark 0.00 out of 1.00
This graph operation stores the graph in computer memory.
a. none of the above
b. create the graph
c. graph
d. draw graph
Your answer is incorrect.
Question 7
Incorrect
Mark 0.00 out of 1.00
It returns a position for the tree’s root.
a. none of the above
b. root
c. root()
d. p.root()
Your answer is incorrect.
Question 8
Incorrect
Mark 0.00 out of 1.00
In a directed graph, edges are drawn using lines.
a. true
b. false
Your answer is incorrect.
Question 9
Correct
Mark 1.00 out of 1.00
It provides a natural organization for data.
a. Binary tree
b. Binary search tree
c. None of the above
d. Trees
Your answer is correct.
Question 10
Correct
Mark 1.00 out of 1.00
It returns true if the tree is empty and false otherwise.
a. empty
b. empty tree
c. isEmpty()
d. empty()
Your answer is correct.
Question 11
Correct
Mark 1.00 out of 1.00
It returns the number of entries in map.
a. entries()
b. None of the above
c. size()
d. number()
Your answer is correct.
Question 12
Correct
Mark 1.00 out of 1.00
It returns true if map is empty and false otherwise.
a. empty()
b. Empty()
c. isEmpty()
d. empty
Your answer is correct.
Question 13
Incorrect
Mark 0.00 out of 1.00
It is a pair of nodes.
a. path
b. edge
c. nodes
d. edge of tree
Your answer is incorrect.
Question 14
Incorrect
Mark 0.00 out of 1.00
It removes from the map the entry.
a. erase
b. remove()
c. erase()
d. erase(k)
Your answer is incorrect.
Question 15
Correct
Mark 1.00 out of 1.00
It is a node where it stores an element.
a. tree
b. left subtree
c. root
d. right subtree
Your answer is correct.
Question 16
Correct
Mark 1.00 out of 1.00
It uses divide-and-conquer technique to sort a list by partitioning the list into two sublists.
a. selection sort
b. merge sort
c. insertion sort
d. quick sort
Your answer is correct.
Question 17
Correct
Mark 1.00 out of 1.00
It is similar to preorder traversal of a binary tree.
a. breadth-first traversal
b. preorder traversal
c. depth-first traversal
d. none of the above
Your answer is correct.
Question 18
Not answered
Marked out of 1.00
What is the first sublist of the following sets of number
10 18 17 15 21 34 36 32 33 37
[1]
Answer:
Question 19
Correct
Mark 1.00 out of 1.00
A binary tree function that removes the last node of the tree and return its element
a. remove(e)
b. delete(e)
c. remove()
d. delete()
Your answer is correct.
Question 20
Correct
Mark 1.00 out of 1.00
The graphs must be stored in computer memory.
a. false
b. true
Your answer is correct.
Question 21
Correct
Mark 1.00 out of 1.00
It allows you to store elements so they can be located quickly using keys.
a. hash table
b. hash map
c. map
d. storage
Your answer is correct.
Question 22
Incorrect
Mark 0.00 out of 1.00
This graph operation makes the graph empty.
a. Empty graph
b. Clear
c. Empty
d. Clear the graph
Your answer is incorrect.
Question 23
Correct
Mark 1.00 out of 1.00
These are used to model electrical circuits, chemical compounds and highway maps.
a. directed graph
b. map
c. graphs
d. None of the above
Your answer is correct.
Question 24
Correct
Mark 1.00 out of 1.00
It returns a position list containing the children of node p.
a. none of the above
b. children
c. children()
d. p.children()
Your answer is correct.
Question 25
Correct
Mark 1.00 out of 1.00
Merge sort combines the two sorted sublists into one sorted list.
a. true
b. false
Your answer is correct.
Question 26
Correct
Mark 1.00 out of 1.00
It is an array of size N where each cell of A is thought of as a bucket
a. array
b. bucket array
c. None of the above
d. bucket
Your answer is correct.
Question 27
Correct
Mark 1.00 out of 1.00
It is a binary tree that stores a collection of elements with their associated keys at its nodes.
a. None of the above
b. heap sort
c. heap
d. heap binary tree
Your answer is correct.
Question 28
Correct
Mark 1.00 out of 1.00
A linear ordering of a tree.
a. None of the above
b. Children node
c. Ordered trees
d. linear order
Your answer is correct.
Question 29
Incorrect
Mark 0.00 out of 1.00
It is an abstract data type that stores elements hierarchically.
a. tree
b. Binary search tree
c. tree structure
d. Binary tree
Your answer is incorrect.
Question 30
Correct
Mark 1.00 out of 1.00
Returns the left child of the p.
a. p.left()
b. left()
c. p.right()
d. p.left
Your answer is correct.
Question 31
Correct
Mark 1.00 out of 1.00
A list is sorted by selecting elements in the list, one at a time, and moving them to their proper positions.
a. Insertion sort
b. Quick sort
c. Mergesort
d. Selection sort
Your answer is correct.
Question 32
Correct
Mark 1.00 out of 1.00
It is consists of two major components: bucket array and a hash function.
a. hash
b. None of the above
c. array
d. hash table
Your answer is correct.
Question 33
Correct
Mark 1.00 out of 1.00
A tree is either empty or consist of nodes.
a. TRUE
b. FALSE
Your answer is correct.
Question 34
Correct
Mark 1.00 out of 1.00
This graph traversal that traverse a binary tree level-by level.
a. depth-first traversal
b. none of the above
c. breadth-first traversal
d. post order traversal
Your answer is correct.
Question 35
Correct
Mark 1.00 out of 1.00
It return true if p is the root and false otherwise.
a. isRoot()
b. Root()
c. none of the above
d. p.isRoot()
Your answer is correct.
Question 36
Correct
Mark 1.00 out of 1.00
The list is partitioned and combining the sorted lowerSublist and upperSublist is trivial.
a. none of the above
b. quicksort
c. divide-and-conquer
d. mergesort
Your answer is correct.
Question 37
Correct
Mark 1.00 out of 1.00
It return an iterator to the first entry of M.
a. begin
b. begin()
c. start()
d. start
Your answer is correct.
Question 38
Correct
Mark 1.00 out of 1.00
It sorts the list by moving each element to its proper place.
a. insertion sort
b. quick sort
c. mergesort
d. selection sort
Your answer is correct.
Question 39
Incorrect
Mark 0.00 out of 1.00
Returns the parent of p.
a. parent()
b. p.parent()
c. p.root
d. root()
Your answer is incorrect.
Question 40
Correct
Mark 1.00 out of 1.00
It is an ordered tree in which every node has at most two children.
a. tree
b. binary search tree
c. none of the above
d. binary tree
Your answer is correct.
◄ Prelim Lab Exam
Jump to...
Midterm Lab Exam ►