0% found this document useful (0 votes)
595 views57 pages

CSD Quiz 2

The document contains questions about data structures and algorithms. It includes multiple choice questions testing knowledge of concepts like hashing, graphs, sorting algorithms, tree traversal, and complexity analysis.

Uploaded by

hughnguyen1201
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
595 views57 pages

CSD Quiz 2

The document contains questions about data structures and algorithms. It includes multiple choice questions testing knowledge of concepts like hashing, graphs, sorting algorithms, tree traversal, and complexity analysis.

Uploaded by

hughnguyen1201
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 57

A chained hash table has an array size of 512.

What is the maximum number of entries that


can be placed in the table?

a.

256

b.

511

c.

1024

d.

512

e.

None of the others

Feedback

The correct answer is: None of the others

Question 2

Complete

Mark 0.0 out of 1.0

Flag question

Question text
What is the tightest Big-O running time to calculate the Flesch readability score in the
EfficientDocument class, where n is the length of the document, assuming you DO NOT include
the time it takes to initialize the numSyllables, numWords, and numSentences variables (i.e. do
not include the time taken by processText)?

a.

O(1)

b.

O(n^2)

c.

O( n )
Feedback

The correct answer is: O(1)

Question 3

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Select true / false statement in regarding to graph representation:

a. There are n possible adjacency matrices for the same graph.

b. Multigraphs can be represented in the following adjacency matrix:


aij = number of edges between vi and vj

a.

a and b are true


b.

a is true and b is false

c.

a and b are false

d.

a is false and b is true


Feedback

The correct answer is: a is false and b is true

Question 4

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Apply Kruskal's Minimum Spanning Tree (MST) to the following graph:

Select false statement:

a.
The algorithm have consideration to edges be, de and cd but does not add them to MST.

b.

cf is the latest edge added to MST.

c.

bc is not added to MST because it forms a cycle with ac and ac.


Feedback

The correct answer is: The algorithm have consideration to edges be, de and cd but does
not add them to MST.

Question 5

Complete

Mark 1.0 out of 1.0

Flag question

Question text

What is the best definition of a collision situation in a hash table?

a.

Two entries with the exact same key have different hash values.

b.

Two entries with different data have the exact same key.

c.

Two entries are identical except for their keys.


d.

Two entries with different keys have the same exact hash value.

Feedback

The correct answer is: Two entries with different keys have the same exact hash value.

Question 6

Complete

Mark 1.0 out of 1.0

Flag question

Question text

What data structure can be used to check if a syntax has balanced paranthesis ?

a.

queue

b.

stack

c.

list

d.

tree
Feedback

The correct answer is:


stack
Question 7

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Select true / false statement in regarding to graph representation:

a. If our task is to process vertices adjacent to a vertex v, then the adjacency list requires
only deg(v) steps, whereas the adjacency matrix requires |V| steps.

b. Inserting or deleting a edge requires linked list maintenance for an adjacency list (if such
an implementation is used); for a matrix, it requires only changing 0 to 1 for insertion, or 1
to 0 for deletion, in one cell of the matrix.

a.

a is false and b is true

b.

a is true and b is false

c.

a and b are false

d.

a and b are true


Feedback

The correct answer is: a and b are false


Question 8

Complete

Mark 0.0 out of 1.0

Flag question

Question text

What is the tightest Big-O running time to calculate the Flesch readability score the first time in
the EfficientDocument class, where n is the length of the document, assuming you include the
time it takes to initialize the numSyllables, numWords, and numSentences variables?

Note that this is not necessarily the running time that you saw when you plotted the graph of
your EfficientDocument running time when you did your benchmarking. That time included the
time to initialize the numSyllables, numWords and numSentences variables.

a.

O( n )

b.

O(n^2)

c.

O(1)
Feedback

The correct answer is: O( n )

Question 9

Complete

Mark 0.0 out of 1.0


Flag question

Question text
Which of the following algorithms in graphs can be implemented by extending Depth First
Search algorithm?

a.

The Chinese Postman Tour

b.

All of the others.

c.

Cycle detection.

d.

Finding the shortest path (Dijkstra algorithm)

Feedback

The correct answer is: Cycle detection.

Question 10

Complete

Mark 1.0 out of 1.0

Flag question

Question text
Which the sorting technique always makes recursive calls to sort pieces that are about half
the size of the original array?

a.

Heap sort.

b.

Radix sort.

c.

Merge sort.

d.

Quick sort.

Feedback

The correct answer is: Merge sort.

Question 11

Complete

Mark 0.0 out of 1.0

Flag question

Question text

What is the worst case time complexity of linear search algorithm?

a.

O(1)
b.

O(logn)

c.

O( n )

d.

Ο(n^2)
Feedback

The correct answer is:

O( n )
Question 12

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Suppose you are doing a breadth-first search of a graph with n vertices, using a queue
implemented with a static array. What is the minimum number of elements of this array?

a.

2n

b.

n
c.

n-1

d.

n+1

Feedback

The correct answer is: n - 1

Question 13

Complete

Mark 1.0 out of 1.0

Flag question

Question text

In .................................. algorithm, each vertex v is visited and then each unvisited vertex
adjacent to v is visited. If a vertex v has no adjacent vertices or all of its adjacent vertices
have been visited, we backtrack to the predecessor of v. The traversal is finished if this
visiting and backtracking process leads to the first vertex where the traversal started. If
there are still some unvisited vertices in the graph, the traversal continues restarting for
one of the unvisited vertices.

a.

Depth First Search

b.

Breath First Search

c.
None of the others
Feedback

The correct answer is: Depth First Search

Question 14

Complete

Mark 1.0 out of 1.0

Flag question

Question text

In a min-heap:

a.

both statements are true

b.

both statements are wrong

c.

parent nodes have values greater than or equal to their childs

d.

parent nodes have values less than or equal to their childs


Feedback

The correct answer is:

parent nodes have values less than or equal to their childs


Question 15

Complete
Mark 0.0 out of 1.0

Flag question

Question text

Given a raw message 'BBBUUUUBBBUUBBBBBUU' (without single quote). Run the run-
length encoding algorithm for that message, what is the output?

a.

3B4U4B3U2B5UU2

b.

3B4U3B2U5B

c.

3B4U3B2U5B2UU

d.

3B4U3B2U5B2U

Feedback

The correct answer is: 3B4U3B2U5B2U

Question 16

Complete

Mark 1.0 out of 1.0

Flag question
Question text

You want to place 1000 elements in a hash table using linear probing, and you would like
an average numbers of trials for successful search two elements. How big does the array of
hash table need to be?

a.

1500

b.

1000

c.

1250

d.

500

Feedback

The correct answer is: 1500

Question 17

Complete

Mark 1.0 out of 1.0

Flag question

Question text

What is output if using LZW algorithm with the table initialized with the letters x, y, z
encode the string “xyxyzxxy”?
a.

443112

b.

12123112

c.

124314

d.

124352

Feedback

The correct answer is: 1 2 4 3 1 4

Question 18

Complete

Mark 0.0 out of 1.0

Flag question

Question text

An array contains the elements shown below:


7 8 26 44 13 23 98 57
What would be the value of the elements in the array after two pass of the heap sort
algorithm.

a.

26 13 23 7 8 44 57 98
b.

57 26 44 7 13 8 23 98

c.

7 8 13 23 26 44 57 98

d.

44 26 23 7 13 8 57 98

Feedback

The correct answer is: 44 26 23 7 13 8 57 98

Question 19

Complete

Mark 0.0 out of 1.0

Flag question

Question text

After two passes of a sort algorithm, the following array:

47 3 21 32 56 92

has been rearranged as shown below:

3 21 47 32 56 92

Which sorting algorithm is being used?

a.

bubble sort.

b.
all of them.

c.

selection sort.

d.

insertion sort.

Feedback

The correct answer is: all of them.

Question 20

Complete

Mark 0.0 out of 1.0

Flag question

Question text

In your benchmarking of the DictionaryBST structure, you probably found that the time to find
words did not significantly increase as the Dictionary got larger. Which of the following is the
most likely reason for this behavior?

a.

log( n ) is sufficiently small and grows sufficiently slowly that other factors (e.g. memory use)
had a bigger effect on the running time than the size to find the word in the dictionary.

b.

We were measuring the best case performance of the dictionary, which does not change as the
dictionary size grows.
c.

The running time to find an element in a balanced BST is O(1) so we would not expect the
running time to get larger as the dictionary got bigger.
Feedback

The correct answer is: log( n ) is sufficiently small and grows sufficiently slowly that other
factors (e.g. memory use) had a bigger effect on the running time than the size to find the word
in the dictionary.

Question 21

Complete

Mark 1.0 out of 1.0

Flag question

Question text

The “prime number division remainder” method is a well-known hashing algorithm. In this
method, a key value is divided by a number N, and the remainder which is also called a
hash value is used directly as an index into the hash table. N is the largest prime number
less than or equal to the size of the table. When the table size is 20, which of the following
is the correct hash value calculated from the key value 136? Here, a prime number is one
that cannot be divided evenly by any other number except one (1). 2, 3, 5, 7, 11, and 13
are the first few prime numbers.

a.

b.

c.

3
d.

16

e.

None of the others.


Feedback

The correct answer is: 3

Question 22

Complete

Mark 0.0 out of 1.0

Flag question

Question text

The keys 12, 18, 13, 2, 3, 23, 5 and 15 are inserted into an initially empty hash table of
length 10 using open addressing with hash function h(k) = k mod 10 and linear probing.
What is the resultant hash table?
a.

b.

c.

d.

Feedback

The correct answer is: C

Question 23

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Suppose that you place 180 elements in a hash table with an array size of 200. What is the
load factor?

a.

0.75
b.

0.9

c.

1.45

d.

0.5

Feedback

The correct answer is: 0.9

Question 24

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Consider the list of eight integers below: 6, 4, 9, 10, 8, 3, 7, 5


What is the list after it has just been partitioned by the first step of quicksort and a pivot
value is chosen as the first element of the list? (sorting from smallest to largest). Assume
that selecting largest element of the array is ignored.

a.

3, 4, 5, 6, 8, 7, 9, 10

b.

3, 4, 5, 6, 8, 10, 7, 9
c.

3, 4, 6, 5, 8, 10, 7, 9

d.

3, 4, 5, 6, 7, 8, 10, 9
Feedback

The correct answer is: 3, 4, 5, 6, 8, 10, 7, 9

Question 25

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Select incorrect statement about Adaptive Huffman Coding:

a.

The sibling property is described as each node has a sibling (except for the root) and the
breadth-first right-to-left tree traversal generates a list of nodes with nonincreasing
frequency counters.

b.

If the sibling property is violated, Huffman tree has to be restructured to restore this
property.

c.

If Adaptive Huffman coding is used to compress execute file, output file is much smaller
than the original.
d.

Adaptive Huffman coding can be applied to any kind of file.

Feedback

The correct answer is: If Adaptive Huffman coding is used to compress execute file, output
file is much smaller than the original.

Question 26

Complete

Mark 0.0 out of 1.0

Flag question

Question text

When the bubble sort algorithm is used for sorting the dataset (23, 43, 56, 12, 87, 14, 87,
15, 90, 23, 10) in descending order, how many data exchanges occur during the first
iteration of outer loop?

a.

b.

10

c.

d.

7
Feedback

The correct answer is: 8

Question 27

Complete

Mark 0.0 out of 1.0

Flag question

Question text

What is output if using LZW algorithm with the table initialized with the letters a, b, c
encode the string “ababcaab”?

a.

124314

b.

12123112

c.

124352

d.

443112

Feedback

The correct answer is: 1 2 4 3 1 4

Question 28

Complete
Mark 0.0 out of 1.0

Flag question

Question text

In order to sort the sequence “98, 12, 4, 56, 34, 23” in ascending order by Bubble Sort
algorithm, how many exchange operations are required?

a.

b.

11

c.

d.

Feedback

The correct answer is: 9

Question 29

Complete

Mark 1.0 out of 1.0

Flag question
Question text

Which of the following is true of searching for an element in a Hash Table that is implemented
using linear probing (you may assume a Hash Table that is ~70% full)?

a.

Average case is log( n )

b.

Worst case is O(1)

c.

Average case is O(1)


Feedback

The correct answer is: Average case is O(1)

Question 30

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Consider a hash table of size seven, with starting index zero, and a hash function h(x)= (3x +
4) mod 7. Assuming the hash table is initially empty, which of the following is the contents
of the table when the sequence 1, 3, 8, 10 is inserted into the table using linear probing?
Note that ‘_’ denotes an empty location in the table.

a.

1, 10, 8, _, _, _, 3
b.

1, _, _, _, _, _,3

c.

8, _, _, _, _, _, 10

d.

1, 8, 10, _, _, _, 3

Feedback

The correct answer is: 1, 8, 10, _, _, _, 3

Question 31

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Encoding the string "aaabbccddddddeee" with Huffman. Please indicate the size of the
output string?

a.

24 bits

b.

16 bits

c.
36 bits

d.

128 bits

Feedback

The correct answer is: 36 bits

Question 32

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Use Dijkstra’s algorithm to find shortest paths from vertex A to others in the following
graph:

What is “current distance of F“ after iteration 3 of the algorithm?

a.
95

b.

20

c.

infinity

d.

70
Feedback

The correct answer is: infinity

Question 33

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Which of the following is the appropriate description of the “selection sort” algorithm?

a.

The element with the smallest value is determined and swapped for the first element, and
then the smallest value of the unsorted elements is determined and swapped for the
second-to-the-first element. This operation is repeated in the same way.

b.
An intermediate reference value is determined, and then the elements are divided into two
groups of “larger” values and “smaller”values. This operation is recursively repeated.

c.

Two adjacent elements are repeatedly compared and swapped if the first element is larger
than the second. This operation is repeated until all elements are arranged in an orderly
fashion.

d.

Each set of the elements extracted at regularintervals is sorted, and then the interval is
further decreased. The operation is repeatedly performed until the interval becomes 1.
Feedback

The correct answer is: The element with the smallest value is determined and swapped for
the first element, and then the smallest value of the unsorted elements is determined and
swapped for the second-to-the-first element. This operation is repeated in the same way.

Question 34

Complete

Mark 1.0 out of 1.0

Flag question

Question text

When a hash table becomes too full, which of the following is required to resize the table?

a.

Create a new table which is larger than the original table. Then individually reinsert each key
from the old table into the new table (i.e. if a key is in location X in the original table, it may or
may not be in position X in the new table).

b.
Add extra space at the end of the existing hash table and leave the old keys in place.

c.

Create a new table which is larger than the original table. Then bulk copy keys from one table to
the other (i.e. if a key is in location X in the original table, it remains in position X in the new
table).
Feedback

The correct answer is: Create a new table which is larger than the original table. Then
individually reinsert each key from the old table into the new table (i.e. if a key is in location X in
the original table, it may or may not be in position X in the new table).

Question 35

Complete

Mark 1.0 out of 1.0

Flag question

Question text
Which of the following Sorting algorithms use Divide and Conquer strategy?

a.

Quick sort

b.

Bubble sort

c.

Heap sort
d.

Radix sort

Feedback

The correct answer is: Quick sort

Question 36

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Use Dijkstra’s algorithm to find shortest paths from vertex C to others in the following
graph:

What is “current distance of A“ after executing of the algorithm end?

a.

35
b.

40

c.

inifinity

d.

0
Feedback

The correct answers are: inifinity, 0

Question 37

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Use Dijkstra’s algorithm to find shortest paths from vertex A to others in the following
graph:
Which vertex is chosen in iteration 4 of the algorithm?

a.

b.

c.

d.

Feedback

The correct answer is: E

Question 38

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Select incorrect statement about restrictions need to be imposed on the prospective codes:

a.

Each codeword may be corresponds to one or many symbols.


b.

There should not be any unused short codewords either as stand-alone encodings or as
prefixes for longer codewords.

c.

The length of the codeword for a given symbol A should not exceed the length of the
codeword of a less probable symbol B.

d.

Decoding should not require any look ahead.

Feedback

The correct answer is: Each codeword may be corresponds to one or many symbols.

Question 39

Complete

Mark 1.0 out of 1.0

Flag question

Question text
Which of the following Sorting algorithms have complexity of O( n ) in best case ?

a.

Insertion sort

b.

All of the others.


c.

Buble sort

d.

Selection sort

Feedback

The correct answer is: Insertion sort

Question 40

Complete

Mark 1.0 out of 1.0

Flag question

Question text

In the algorithm for spelling suggestions in this week's assignment, there was a hash set to
mark Strings as visited. What is the BEST ANSWER for why we used the visited set?

a.

To avoid testing to see if a mutated String was a real word (and hence a spelling suggestion)
more than once.

b.

So that our exploration was of a tree of words, and if we had a word repeated, it wouldn't be a
tree anymore.

c.

To avoid exploring all the possible String mutations for an individual String more than once.
Feedback
The correct answer is: To avoid exploring all the possible String mutations for an individual
String more than once.

Question 41

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Apply Floyd algorithm to the following graph:

Which of the following statements is false?

a.

In initial weighted matrix, distances from e to others are infinity.

b.

We can find shortest paths from any vertex to others in this graph.

c.
The shortest path from vertex a to vertex e is zero.

d.

abce is not shortest path from a to e.


Feedback

The correct answer is: We can find shortest paths from any vertex to others in this graph.

Question 42

Complete

Mark 1.0 out of 1.0

Flag question

Question text

In run-length encoding algorithm, a run is defined as …

a.

size of the result of encoding input data.

b.

number of different characters in the input.

c.

amount of time required to the compression algorithm.

d.

a sequence of identical characters.

Feedback
The correct answer is: a sequence of identical characters.

Question 43

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Which of the following is a reason why hash tables are a good choice for storing and retrieving
data?

a.

They store data in sorted order so it is easy to find the minimum and maximum element

b.

They are very space efficient compared to binary search trees and linked lists

c.

They are very fast in practice for finding items in a set


Feedback

The correct answer is: They are very fast in practice for finding items in a set

Question 44

Complete

Mark 1.0 out of 1.0

Flag question

Question text
The best technique when the amount of data is not well known is ……

a.

quadratic probing.

b.

linear probing.

c.

separate chaining.

d.

double hashing.

Feedback

The correct answer is: separate chaining.

Question 45

Complete

Mark 0.5 out of 1.0

Flag question

Question text

Which of the following algorithms can be used to detect cycle of a graph?

a.

Union-Find
b.

Minimum Spanning Tree

c.

Graph coloring

d.

Depth First Traversal


Feedback

The correct answers are: Union-Find, Depth First Traversal

Question 46

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Quick sort algorithm is an example of

a.

Dynamic Programming

b.

Improved binary search

c.
Greedy approach

d.

Divide and conquer


Feedback

The correct answer is:

Divide and conquer


Question 47

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Does a higher or lower Flesch Index Score indicate simpler text?

a.

The higher the Flesch Index Score, the simpler the text and the easier it is to read.

b.

The lower the Flesch Index Score, the simpler the text and the easier it is to read.
Feedback

The correct answer is: The higher the Flesch Index Score, the simpler the text and the easier it
is to read.

Question 48

Complete

Mark 1.0 out of 1.0


Flag question

Question text

Select incorrect statements about the shortest path algorithm:

a.

Dijkstra’s algorithm is sort of label-setting.

b.

Dijkstra’s algorithm is used to graphs which have positive weight.

c.

Dijkstra’s algorithm cannot be applied to undirected weighted graphs.

d.

Dijkstra’s algorithm finds the shortest path from one specified vertex to all other vertices.

Feedback

The correct answer is: Dijkstra’s algorithm cannot be applied to undirected weighted
graphs.

Question 49

Complete

Mark 0.0 out of 1.0

Flag question

Question text
Select correct statement:

a.

The bubble sort always ends up comparing every item with every other item.

b.

A copy is three times as fast as a swap.

c.

If there are N items, the bubble sort makes exactly N*N comparisons.

d.

In a particular sorting situation, if swaps take much longer than comparisons, the selection
sort is about twice as fast as the bubble sort.

Feedback

The correct answer is: A copy is three times as fast as a swap.

Question 50

Complete

Mark 1.0 out of 1.0

Flag question

Question text

What is the tightest Big-O running time to calculate the Flesch readability score for the
BasicDocument class, where n is the length of the document?

a.

O( n )
b.

O(n^2)

c.

O(n^3)

d.

O(1)
Feedback

The correct answer is: O( n )

Question 51

Complete

Mark 1.0 out of 1.0

Flag question

Question text

In a weighted graph, the minimum spanning tree tries to minimize ………..

a.

the total weight of the edges from the starting vertex to a specified vertex.

b.

the number of edges connecting all the vertices.

c.
the total weight of edges connecting all the vertices.

d.

the number of edges from the starting vertex to a specified vertex.

Feedback

The correct answer is: the total weight of edges connecting all the vertices.

Question 52

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Find the average length LHuf for the letters X, Y, and Z and their probabilities .05, .05 and .9
respectively.

a.

0.8

b.

1.75

c.

2.3

d.

1.1
e.

None of the others.

Feedback

The correct answer is: 1.1

Question 53

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Maximum number of nodes in a binary tree with height k, where root is height 0, is

a.

(2^k) -1

b.

(2^(k-1)) -1

c.

(2^(k+1)) -1

d.

(2^k) +1
Feedback

The correct answer is:


(2^(k+1)) -1
Question 54

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Which of the following data structures are the most suites for handling the minimum
(maximum) weighted distances?

a.

Linked list

b.

Queue

c.

Priority Queue

d.

Stack

Feedback

The correct answer is: Priority Queue

Question 55

Complete

Mark 0.0 out of 1.0


Flag question

Question text

Which of the following data structures does not suitable for implementing Huffman
algorithm?

a.

Heap.

b.

Doubly linked list.

c.

Singly linked list.

d.

Queue.

Feedback

The correct answer is: Queue.

Question 56

Complete

Mark 1.0 out of 1.0

Flag question

Question text
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and
linear probing. After inserting 6 values into an empty hash table, the table is

as shown below.

Which one of the following choices gives a possible order in which the key values could
have been inserted in the table? (Assume that Linear probing was used to resolved
collision)

a.

46, 42, 34, 52, 23, 33

b.

42, 46, 33, 23, 34, 52

c.

46, 34, 42, 23, 52, 33

d.
34, 42, 23, 52, 33, 46

Feedback

The correct answer is:

46, 34, 42, 23, 52, 33

Question 57

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Using the coalesced hashing to put the following values in a table with 10 elements:

A5, A2, A3, B5, A9, B2, B9, C2

Using the extraction method to extract the number as the key.

What is the chain to begin with A5?

a.

A5-B5

b.

A5-B5-A9-B9

c.

A5-B2-C2

d.

A5-A2-A3
Feedback

The correct answer is: A5-B5-A9-B9

Question 58

Complete

Mark 0.0 out of 1.0

Flag question

Question text

Given the character frequencies


B : 32%
C : 28%
D : 16%
E : 6%
F : 18%
Using Huffman encoding, what is the code for character D? (Suppose that when
constructing a sub tree from 2 nodes we always place node with higher frequency on the
left; and the left branch of a node gets value 0, the right one gets value 1)

a.

01

b.

101

c.

001

d.
100

Feedback

The correct answer is: 100

Question 59

Complete

Mark 1.0 out of 1.0

Flag question

Question text

Which of the following statements about the shortest path finding algorithm of Dijkstra is
true?

a.

It is label-setting algorithm.

b.

It can be applied to graphs have negative weights.

c.

It's complexity is O(|V|), where |V| is number of vertices of the graph.

d.

All of the others.

Feedback

The correct answer is: It is label-setting algorithm.

Question 60
Complete

Mark 0.0 out of 1.0

Flag question

Question text

Which of the following graphs looks most like the graph you (should have) produced in part
2 of the programming assignment? We are looking for you to compare the shapes of the
functions only--these graphs are much smoother than what you would have seen. Also,
ignore the specific numbers, and concentrate on the shapes and the relationship between
the two lines. Note that the correct answer assumes that you have correctly implemented
your two Document classes and your DocumentBenchmarking class.
a.

b.

c.

d.

a
Feedback
The correct answer is: a

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy