(CS-C949) ICSC 2100 Data Structures & Algorithms I - Latest FA Review Q & S 2024
6 views 0 purchase
Module
Information Technology
Institution
Western Governors University
(CS-C949) ICSC 2100 Data Structures & Algorithms I - Latest FA Review Q & S 2024(CS-C949) ICSC 2100 Data Structures & Algorithms I - Latest FA Review Q & S 2024(CS-C949) ICSC 2100 Data Structures & Algorithms I - Latest FA Review Q & S 2024
,1. Multiple Choice: Which of the following data structures is non-
linear?
a) Array
b) Linked List
c) Graph
d) Stack
Correct Answer: c) Graph
Rationale: Graphs represent relationships between pairs of
objects, which is inherently a non-linear form of data structure,
unlike arrays, linked lists, and stacks which are linear.
2. Fill-in-the-Blank: In a binary search tree, the left child's value
is always _______ the parent's value.
Correct Answer: less than or equal to
Rationale: This property ensures that the tree is sorted and
allows for efficient search operations.
3. True/False: The time complexity of the best case for a quicksort
algorithm is O(n log n).
Correct Answer: True
, Rationale: In the best case, quicksort divides the array into equal
parts with each partitioning step, leading to a time complexity of
O(n log n).
4. Multiple Response: Which of the following are characteristics
of a hash table? (Select all that apply)
a) Direct access
b) Ordered
c) Key-value pairs
d) Fixed size
Correct Answers: a) Direct access, c) Key-value pairs
Rationale: Hash tables provide direct access to elements through
keys and store data as key-value pairs. They are not necessarily
ordered or of fixed size.
5. Multiple Choice: What is the space complexity of a depth-first
search (DFS) on a graph?
a) O(log n)
b) O(n)
c) O(n^2)
d) O(1)
Correct Answer: b) O(n)
, Rationale: DFS requires space proportional to the height of the
graph's tree representation, which can be as large as O(n) in the
case of a linked list-like structure.
6. Fill-in-the-Blank: A _______ is a self-balancing binary search
tree.
Correct Answer: AVL tree
Rationale: An AVL tree is a self-balancing binary search tree
that maintains its height to be logarithmic relative to the number
of nodes.
7. True/False: A graph can have an Euler circuit if and only if all
vertices have even degree.
Correct Answer: True
Rationale: An Euler circuit requires that a path starts and ends at
the same vertex, with each edge being visited exactly once, which
is only possible if all vertices have an even degree.
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Bankart. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for £10.12. You're not tied to anything after your purchase.