1/64
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Which term refers to a template for creating an object?
Class
3 multiple choice options
Which characteristic of an algorithm is independent in nature?
Uses an agnostic code repository
3 multiple choice options
What is referred to as a data structure that stores subitems?
Record
3 multiple choice options
Which factor takes the ability to easily update an algorithm into consideration?
Maintainability
3 multiple choice options
What is a component of an algorithm that specifies a stopping point?
Finiteness
3 multiple choice options
Which term refers to a type of search algorithm?
linear
3 multiple choice options
What is a high-level consideration in an algorithm's design?
Simplicity
3 multiple choice options
What is the primary method used to search for an item in a sorted array?
Binary search
3 multiple choice options
Which review of an algorithm happens after implementation?
A posteriori analysis
3 multiple choice options
Which factor helps measure the reusability of an algorithm?
Extensibility
3 multiple choice options
Which search algorithm utilizes the divide-and-conquer strategy?
Binary search
3 multiple choice options
Which algorithm requires data sorting as its first step?
Binary
3 multiple choice options
What does a time complexity analysis of an algorithm include?
Worst case
3 multiple choice options
Which data type do heap sorts work with?
Tree-based data structure
3 multiple choice options
Which function is used in conjunction with a merge sort algorithm?
Recursive
3 multiple choice options
Which attribute of a recursive function makes it unique?
Calls itself
3 multiple choice options
What is x in the following block of logic?
x=28
If x >= 10 and x < 20
x = 20
elif x <= 30
x = 25
elif x >= 50
x = 100
else
x = 500
25
3 multiple choice options
What is an if statement inside of an if statement referred to as?
Nested
3 multiple choice options
Which search algorithm functions by continually dividing the data set in half until the sought item is found or the data set is exhausted?
Binary search
3 multiple choice options
Which search algorithm has the best performance when the data set is sorted?
Interval search
3 multiple choice options
Which format is used to store data in a hash table?
Array
3 multiple choice options
Which term refers to a data structure that groups related items of data together?
Record
3 multiple choice options
Which data structure is used to store unordered items by mapping each item to a location in an array?
Hash table
1 multiple choice option
What is the advantage that a linked list has over an array?
Grows and shrinks as needed
3 multiple choice options
What would be the best data structure for a hash table with simple chaining?
A doubly linked list
3 multiple choice options
Which data structure is the most dynamic in storing data items of varying lengths?
List
3 multiple choice options
What is the resulting stack when the push(1) function is implemented on this stack yield?
8,9,3,5(top is 8)
1,8,9,3,5
3 multiple choice options
What will the peek() operation from this stack return?
8,9,3,5(top is 8)
8
What is the set that results from set1 intersection set2, given these sets?
set1 = {69,82,47}
set2 = {11,82}
{82}
3 multiple choice options
Which term describes a way of organizing, storing, and performing operations on data?
Data structure
3 multiple choice options
Which data structure is used to implement a dictionary data type?
Hash table
3 multiple choice options
Which element refers to the numeric positions in a list abstract data type (ADT)?
Indexes
3 multiple choice options
Which characteristic of a class allows it to be used as an abstract data type (ADT)?
It consists of variables and methods.
3 multiple choice options
What is the result when 6 is enqueued to the queue 7,9,8 (with 7 as the front)?
7,9,8,6
3 multiple choice options
Which value would be returned from executing the dequeue operation on the queue 7,9,8 (with 7 as the front)?
7
3 multiple choice options
Which queue results from executing the following queue operations on the queue 7,9,8 (with 7 as the front)?
Dequeue ()
Enqueue (6)
Enqueue (5)
Dequeue ()
8,6,5
3 multiple choice options
What will be the new state of the queue 7,9,8 (with 7 as the front) after the enqueue (3) operation?
7,9,8,3
3 multiple choice options
What is the order of these functions by growth rate?
2/N,37,2N,N log(N2),N2
2/N< 37
How many elements will be compared to linear search for 27 in this list?
[9,3,7,2,8,15,13,35,95,7,4]
11
3 multiple choice options
What is the first element visited in this list when binary searching for the number 7?
[6,7,8,9,11,15,20]
9
3 multiple choice options
How many elements in a list of size 64 would be visited when using a binary search for a number that is larger than all the values in the list?
6
3 multiple choice options
How many elements in a list of size 64 would be visited when using a binary search for a number that is smaller than all the values in the list?
6
3 multiple choice options
What is the runtime complexity of the algorithm O(N^N + 1)?
Exponential
3 multiple choice options
What is the runtime complexity for the expression 305 + O(325*N)?
O(N)
3 multiple choice options
What is the runtime complexity for this code?
for x in range(N):
for y in range(N):
for z in range(N):
tot = tot + z
print tot
O(n^3)
Which term describes an abstract data type (ADT) that Python uses?
Array
3 multiple choice options
Which abstract data type (ADT) is characterized by the LIFO (last in, first out) principle?
Stack
3 multiple choice options
Which queue operation removes an item from the front of the queue?
dequeue
3 multiple choice options
Which function in Python returns the number of times the desired value is found in a tuple?
count()
3 multiple choice options
Which function in Python is used to find a specific value in a tuple?
index()
3 multiple choice options
Which Python list function will remove all items from a list?
clear()
3 multiple choice options
Which abstract data type (ADT) allows operations at one end only?
Stack
3 multiple choice options
Which Python list function removes the first instance of the specified element?
remove()
3 multiple choice options
How does the insertion sort algorithm sort through a list?
By iterating through the sorted list while placing each value into its correct sorted position within the list
3 multiple choice options
What is the average runtime complexity of the merge sort algorithm?
O(N*log(N))
3 multiple choice options
What is the midpoint given the quicksort on this list? Consider the lowindex = 5 and highindex = 9.
(43,3,72,18,2,28,51,111,66,71)
7
3 multiple choice options
What is the pivot point given the quicksort on this list? Consider the lowindex = 5 and highindex = 9.
(43,3,72,18,2,28,51,111,66,71)
111
3 multiple choice options
Which tool in Python is used to implement a deque ADT?
Collections
3 multiple choice options
Which function in Python is used to delete one item on the right side of the deque?
pop()
3 multiple choice options
Which function determines that a linked list contains no data?
IsEmpty()
3 multiple choice options
What are classes composed of that perform the actions of an application?
Methods
3 multiple choice options
Which loop type will always be done at least once?
Do while
3 multiple choice options
How would a strongly typed language create an integer variable?
int myVar
3 multiple choice options
Which component of a case statement would be considered a fall back in case no other parameters are met?
Default
3 multiple choice options
Which operator is a type of assignment operator?
+=
3 multiple choice options