100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

C949 DATA STRUCTURES AND ALGORITHMS EXAM QUESTIONS WITH CORRECT ANSWERS

Rating
-
Sold
-
Pages
7
Grade
A+
Uploaded on
28-07-2025
Written in
2024/2025

C949 DATA STRUCTURES AND ALGORITHMS EXAM QUESTIONS WITH CORRECT ANSWERS

Institution
DATA STRUCTURES
Course
DATA STRUCTURES









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
DATA STRUCTURES
Course
DATA STRUCTURES

Document information

Uploaded on
July 28, 2025
Number of pages
7
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

C949 DATA STRUCTURES AND
ALGORITHMS EXAM

Record - Correct Answers -Data structure that stores subitems, w/ names associated w/
each subitem

Array - Correct Answers -Data structure that stores an ordered list of items, w/ each
item directly accessible by a positional index.

Linked List - Correct Answers -Data structure that stores an ordered list as nodes, each
node stores data and has a pointer to the next node.

Binary Tree - Correct Answers -Data structure where each node stores data and has up
to two children, left child and right child.
Insertion Sort - Correct Answers -A simple sorting algorithm that builds the final sorted
array (or list) one item at time. It is much less efficient on large lists than more advanced
algorithms such as quicksort, heapsort, or merge sort.
Run time : O(N^2)

Difference between Selection and Insertion Sort - Correct Answers -The difference is in
what the inner loop does: In selection sort, the inner loop is over the unsorted elements.
Each pass selects one element, and moves it to its final location (at the current end of
the sorted region). In insertion sort, each pass of the inner loop iterates over the sorted
elements.

Hash Table - Correct Answers -Data structure that stores unordered items by mapping
each item to a location in an array.

Max Heap - Correct Answers -Tree that maintains the simple property that a node's key
is greater than or equal to a node's children key.

Min Heap - Correct Answers -A tree that maintains simple property that node's key is
less than or equal to the node's children key.

Graph - Correct Answers -Represents connections among items. Consists of vertices
and edges. Vertex represents an item on a graph. Edges represent a connection
between two vertices.

Abstract Data Type (ADT) - Correct Answers -Data type described by predefined user
operations. Does not say anything about the implementation.

, List - Correct Answers -Common ADT for holding ordered data.Like an array. Can store
ints, strings.
Ex. nums = [5, 25, 30]

Queue - Correct Answers -ADT where items are inserted at the end of the queue and
removed at the front of the queue. First in first out ADT.
push - inserts items at the end of the queue
pop - removes and returns the item at the front of the queue.

Dictionary - Correct Answers -Maps keys to values. Uses {}. The value can be
number,string, or tuple. Can be any type.
ex. players = {
'Lionel Messi': 10,
'Christiano Ronaldo': 7
}

If else statement - Correct Answers -Branching directs programs to execute either one
group of statements or another.
ex.
if expression:
# Statements to execute when expression is true
else:
# Statements to execute when expression is false
# Statements here execute after the if-else.

Multiple if else statements - Correct Answers -elif used when two or more branches.
if age <= 15:
print('Too young for car insurance.')
price = 0
elif age <= 24:
price = age_16_to_24
elif age <= 39:
price = age_25_to_39
else:
price = age_40_up

Boolean Operators - Correct Answers -In python must True / False must be capitalized.
Has 3 operators: and / or / not
(age > 16) and (age < 25)
(age > 16) or (days > 10)
not (days > 10)

Membership Operators - Correct Answers -not , in
Cannot check for values but can check for keys.
ex.
my_dict = {'A': 1, 'B': 2, 'C': 3}

Get to know the seller

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.
millyphilip West Virginia University
View profile
Follow You need to be logged in order to follow users or courses
Sold
2812
Member since
3 year
Number of followers
1959
Documents
40838
Last sold
1 day ago
white orchid store

EXCELLENCY IN ACCADEMIC MATERIALS ie exams, study guides, testbanks ,case, case study etc

3.7

534 reviews

5
234
4
83
3
103
2
31
1
83

Recently viewed by you

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

Frequently asked questions