Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
195 views

MIDTERM EXAM - Attempt Data Structures and Algorithms

The document summarizes the results of a midterm exam on data structures taken by the student. They answered 15 out of 40 questions correctly, earning a grade of 37.5% overall. The midterm consisted of multiple choice questions testing knowledge of concepts like maps, trees, graphs, sorting algorithms, and tree and graph traversal methods.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
195 views

MIDTERM EXAM - Attempt Data Structures and Algorithms

The document summarizes the results of a midterm exam on data structures taken by the student. They answered 15 out of 40 questions correctly, earning a grade of 37.5% overall. The midterm consisted of multiple choice questions testing knowledge of concepts like maps, trees, graphs, sorting algorithms, and tree and graph traversal methods.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Home / My courses / UGRD-ITE6201-2223T / MIDTERM EXAMINATION / MIDTERM EXAM

Started on Friday, 17 March 2023, 5:03 PM


State Finished
Completed on Friday, 17 March 2023, 5:09 PM
Time taken 5 mins 24 secs
Marks 15.00/40.00
Grade 37.50 out of 100.00

Question 1
Correct

Mark 1.00 out of 1.00

It allows you to store elements so they can be located quickly using keys.

a. map 

b. hash table

c. storage

d. hash map

Your answer is correct.

Question 2
Correct

Mark 1.00 out of 1.00

It provides a natural organization for data.

a. Trees

b. Binary tree

c. None of the above

d. Binary search tree

Your answer is correct.


Question 3

Incorrect

Mark 0.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 incorrect.

Question 4

Incorrect

Mark 0.00 out of 1.00

It stores elements at the nodes of the tree.

a. binary search tree 

b. binary tree

c. tree

d. root

Your answer is incorrect.

Question 5

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 6

Incorrect

Mark 0.00 out of 1.00

These are used to model electrical circuits, chemical compounds and highway maps.

a. map 

b. graphs

c. directed graph

d. None of the above

Your answer is incorrect.

Question 7

Incorrect

Mark 0.00 out of 1.00

It is an array of size N where each cell of A is thought of as a bucket

a. bucket 

b. bucket array

c. array

d. None of the above

Your answer is incorrect.

Question 8
Incorrect

Mark 0.00 out of 1.00

This graph operation stores the graph in computer memory.

a. none of the above 

b. graph

c. create the graph

d. draw graph

Your answer is incorrect.


Question 9

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 10

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. heap 

b. None of the above

c. heap sort

d. heap binary tree

Your answer is correct.

Question 11

Incorrect

Mark 0.00 out of 1.00

It sorts the list by moving each element to its proper place.

a. selection sort 

b. insertion sort

c. quick sort

d. mergesort

Your answer is incorrect.


Question 12

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()

b. delete(e)

c. remove(e)

d. delete()

Your answer is correct.

Question 13

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. merge sort 

b. insertion sort

c. quick sort

d. selection sort

Your answer is correct.

Question 14

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. graph

c. directed graph

d. graphs

Your answer is incorrect.


Question 15

Incorrect

Mark 0.00 out of 1.00

It is a pair of nodes.

a. edge 

b. path

c. edge of tree

d. nodes

Your answer is incorrect.

Question 16

Correct

Mark 1.00 out of 1.00

This graph traversal that traverse a binary tree level-by level.

a. breadth-first traversal

b. post order traversal

c. none of the above

d. depth-first traversal

Your answer is correct.

Question 17

Incorrect

Mark 0.00 out of 1.00

It returns a position for the tree’s root.

a. none of the above 

b. p.root()

c. root

d. root()

Your answer is incorrect.


Question 18

Incorrect

Mark 0.00 out of 1.00

Returns the parent of p.

a. root() 

b. p.root

c. p.parent()

d. parent()

Your answer is incorrect.

Question 19

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 20
Correct

Mark 1.00 out of 1.00

Returns the left child of the p.

a. p.left() 

b. p.left

c. left()

d. p.right()

Your answer is correct.


Question 21

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 22
Correct

Mark 1.00 out of 1.00

It returns the number of entries in map.

a. size() 

b. entries()

c. None of the above

d. number()

Your answer is correct.

Question 23
Correct

Mark 1.00 out of 1.00

The list is partitioned and combining the sorted lowerSublist and upperSublist is trivial.

a. quicksort

b. mergesort

c. none of the above

d. divide-and-conquer

Your answer is correct.


Question 24

Incorrect

Mark 0.00 out of 1.00

It is consists of two major components: bucket array and a hash function.

a. array 

b. None of the above

c. hash table

d. hash

Your answer is incorrect.

Question 25

Incorrect

Mark 0.00 out of 1.00

A linear ordering of a tree.

a. linear order 

b. Children node

c. Ordered trees

d. None of the above

Your answer is incorrect.

Question 26

Incorrect

Mark 0.00 out of 1.00

Merge sort combines the two sorted sublists into one sorted list.

a. false 

b. true

Your answer is incorrect.


Question 27

Incorrect

Mark 0.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. Quick sort 

b. Selection sort

c. Insertion sort

d. Mergesort

Your answer is incorrect.

Question 28

Incorrect

Mark 0.00 out of 1.00

The graphs must be stored in computer memory.

a. false 

b. true

Your answer is incorrect.

Question 29
Incorrect

Mark 0.00 out of 1.00

It returns the parent of the tree.

a. parent 

b. root()

c. p.parent()

d. parent()

Your answer is incorrect.


Question 30

Incorrect

Mark 0.00 out of 1.00

It removes from the map the entry.

a. erase() 

b. erase(k)

c. remove()

d. erase

Your answer is incorrect.

Question 31

Correct

Mark 1.00 out of 1.00

It returns a position list containing the children of node p.

a. p.children() 

b. none of the above

c. children()

d. children

Your answer is correct.

Question 32

Incorrect

Mark 0.00 out of 1.00

This graph operation makes the graph empty.

a. Clear 

b. Empty graph

c. Empty

d. Clear the graph

Your answer is incorrect.


Question 33

Correct

Mark 1.00 out of 1.00

It is an ordered tree in which every node has at most two children.

a. binary tree 

b. binary search tree

c. none of the above

d. tree

Your answer is correct.

Question 34

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 35
Incorrect

Mark 0.00 out of 1.00

It is an abstract data type that stores elements hierarchically.

a. Binary tree 

b. tree structure

c. tree

d. Binary search tree

Your answer is incorrect.


Question 36

Incorrect

Mark 0.00 out of 1.00

It returns true if map is empty and false otherwise.

a. empty 

b. empty()

c. Empty()

d. isEmpty()

Your answer is incorrect.

Question 37

Correct

Mark 1.00 out of 1.00

It is similar to preorder traversal of a binary tree.

a. depth-first traversal

b. preorder traversal

c. none of the above

d. breadth-first traversal

Your answer is correct.

Question 38

Incorrect

Mark 0.00 out of 1.00

It return true if p is the root and false otherwise.

a. none of the above 

b. Root()

c. p.isRoot()

d. isRoot()

Your answer is incorrect.


Question 39

Incorrect

Mark 0.00 out of 1.00

In an undirected graph, edges are drawn using lines.

a. true 

b. false

Your answer is incorrect.

Question 40
Incorrect

Mark 0.00 out of 1.00

It is a node where it stores an element.

a. right subtree 

b. root

c. left subtree

d. tree

Your answer is incorrect.

◄ Prelim Lab Exam

Jump to...

Midterm Lab Exam ►

You might also like