Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

CMSC 341 (Data Structures) Final Exam Graded A+

Document preview thumbnail
Preview 2 out of 6 pages

CMSC 341 (Data Structures) Final Exam Graded A+

Content preview

CMSC 341 (Data Structures) Final Exam
Graded A+


Generally, the stack ADT provides "First In First Out" data storage. - ANSWER-False

In a class with memory allocation we do not need to implement an assignment
operator. The one provided by the compiler makes deep copies of objects. -
ANSWER-False

Algorithm A executes an O(log n)-time computation for each entry of an n-element
array. What is the worst-case running time of algorithm A? - ANSWER-The worst
case running time for algorithm A is O(n log n)

In a singly linked list with only a head pointer, inserting a node at its tail is as
efficient as inserting a node at the tail of a doubly linked list with two pointers to
head and tail. Note: efficiency means the number of required node visits. -
ANSWER-False

We are designing an application for the airport control tower which keeps track of
airplanes ready for take off. Airplanes take off in the order they get ready. What
ADT is a proper one to store the list of planes so that the tower can use to issue the
take off permission? - ANSWER-Queue

The circular singly linked list is more efficient than a doubly linked list with regard
to space usage, when implementing the queue ADT. - ANSWER-True

How do we prevent modifications to an object, when we pass the object by
reference to a function? - ANSWER-by passing the object as const

The space required for the stack ADT for n data points, is O(log n). - ANSWER-False

Worst growth rate in running an algorithm - ANSWER-O(n log n)

We want to design an application which its job is to cypher a message. The
algorithm reads the message as a stream of characters, changes some characters
randomly and converts them to another character, at the end it writes the message
in a reversed stream of characters. Then the reversed message will be sent to the
destination. What is the proper ADT to be used in this algorithm? - ANSWER-Stack

In a doubly linked list implementation of the queue ADT, both enqueue and
dequeue operations run in O(1) - ANSWER-True

What is the upper bound for the growth rate of the following function? - ANSWER-
O(n^2)

, What is the upper bound for the growth rate of insertion at the head of an array? -
ANSWER-O(n)

ADT stands for ... - ANSWER-Abstract Data Type

If T(n) is O( f ( n ) ) then there is a constant c > 0 such that T(n) ≤ c f (n) for all
non-negative n. - ANSWER-True

Pre-order traversal can be used to evaluate arithmetic expressions. - ANSWER-
False

What is the upper bound for the growth rate of insertion at an arbitrary location in a
linked list? - ANSWER-O(n)

The function (3n2 + 5n2 log n + n) is O(n^2). - ANSWER-True

If we know the number of data points in advance, using an array is more efficient
than a linked list with regard to space usage. - ANSWER-True

We have used a chaining collision handling scheme with doubly linked lists in a
hash table implementation. What is the worst case running time for search
operations? - ANSWER-O(n)

In a real-time system the search running time is critical. What data structure do
you suggest as a collision handling scheme for a hash table implementation in such
a system? - ANSWER-chaining with a binary search tree

The height of a Heap data structure is ... - ANSWER-O(log n)

What list presents the results of storing (5,28,19,15,20,33,12) in a hash table using
linear probing collision handling. Assume the table has 9 buckets, and the hash
function is h(k) = k % 9. - ANSWER-28,19,20,12,5,15,33

In a hash table using open addressing collision handling, we can store multiple data
items in every bucket - ANSWER-False

The following list is the vector presentation of a heap data structure. No key is
stored in index 0 of the array. Does a preorder traversal of this heap produce the
keys in sorted order? [x, 1, 5, 2, 8, 9, 7, 6] - ANSWER-No

What type of numbers are the best for the table size of a hash table? - ANSWER-
prime numbers

In a priority queue, the items leave the queue in the order that they arrived. -
ANSWER-False

Induction method - ANSWER-step 1: n = 1

Document information

Uploaded on
August 26, 2026
Number of pages
6
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$12.79

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
CLOUND
3.9
(128)
Sold
659
Followers
389
Items
12294
Last sold
3 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions