ACTUAL EXAM TEST BANK| C949 DATA STRUCTURES
AND ALGORITHMS OA FINAL REEVIEW WITH 350
REAL EXAM QUESTIONS AND CORRECT VERIFIED
ANSWERS/ ALREADY GRADED A+ (MOST RECENT!!)
Which type of operation is represented in the pseudocode?
int x,y,z;
x=y=z=100;
A) Ternary
B) Assignment
C) Comparison
D Equality - Correct Answer - B
What is the most efficient data type to use for this data set of a fixed size
in Java?
a = [0, 0, 1, 4, 7, 16, 31, 64, 127]
A) List
B) Tuple
C) Array
D) Dictionary - Correct Answer - C
Which data type is appropriate for this array to store the given data?
pg. 1
,a = ["AF", "71", "BC", "157", "BA", "253"]
A) Byte
B) Char
C) Short
D) String - Correct Answer - D
Which data type is appropriate for the given data set?
a = [1, 717, 23, 12, 314, 6]
A) Int
B) Byte
C) Char
D) Boolean - Correct Answer - A
Which data type should be used for this object?
days = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday"}
A) Float
B) String
C) Integer
D) Boolean - Correct Answer - B
Which data type should be used for this variable?
pg. 2
,phoneNum = "212-555-1212"
A) Long
B) Short
C) String
D) Integer - Correct Answer - C
What are the array elements corresponding to the mid-values in the first
and second iterations of a binary search in an array arr = {45, 77, 89, 90,
94, 99, 100} and key = 100?
A) 89 and 94
B) 90 and 99
C) 94 and 99
D) 90 and 100 - Correct Answer - B
What are the mid-values in the first and second levels of recursion in this
binary search?
int arr = {46, 76, 89, 90, 94, 99, 100} and key = 99
A) 89 and 94
B) 89 and 99
C) 90 and 94
D) 90 and 99 - Correct Answer - D
What is a characteristic of keys in an associative dictionary data type?
pg. 3
, A) They are unique and mutable.
B) They are unique and immutable.
C) They are non-unique and mutable.
D) They are non-unique and immutable. - Correct Answer - B
Which method can be used to take a value out of a dictionary?
A) D1[key].pop(value)
B) D1[key].pull(value)
C) D1[key].delete(value)
D) D1[key].remove(value) - Correct Answer - D
Given this data dictionary in Python:
dict = {'white':0x0000, 'black':0x1111}
Which command/function generates the output ['white','black']?
A) dict_keys()
B) keys_values()
C) dict.keys()
D) keys.values() - Correct Answer - C
Which data structure uses a last in, first out (LIFO) removal of items?
A) Tree
B) Queue
C) Stack
pg. 4