Attempt #1

Status: Not Passed

Status: Not Passed

1.

Which term refers to a template for creating an object?

Your Answer | Correct Answer | |
---|---|---|

Application | ||

Class | ||

Algorithm | ||

Method |

2.

Which characteristic of an algorithm is independent in nature?

Your Answer | Correct Answer | |
---|---|---|

Uses Python to implement the algorithm | ||

Uses MySQL for the database needs of the algorithmâ€™s application | ||

Uses Windows to install the application | ||

Uses an agnostic code repository |

3.

What is referred to as a data structure that stores subitems?

Your Answer | Correct Answer | |
---|---|---|

Array | ||

Matrix | ||

Record | ||

Graph |

4.

Which factor takes the ability to easily update an algorithm into consideration?

Your Answer | Correct Answer | |
---|---|---|

Scalability | ||

Feasibility | ||

Maintainability | ||

Modularity |

5.

What is a component of an algorithm that specifies a stopping point?

Your Answer | Correct Answer | |
---|---|---|

Sequencing | ||

Finiteness | ||

Iteration | ||

Looping |

6.

Which term refers to a type of search algorithm?

Your Answer | Correct Answer | |
---|---|---|

Linear | ||

Divide-and-conquer | ||

Greedy | ||

Quicksort |

7.

What is a high-level consideration in an algorithmâ€™s design?

Your Answer | Correct Answer | |
---|---|---|

Simplicity | ||

Database type | ||

Finiteness | ||

Browser type |

8.

What is the primary method used to search for an item in a sorted array?

Your Answer | Correct Answer | |
---|---|---|

Binary search | ||

Jump search | ||

Exponential search | ||

Linear search |

9.

Which review of an algorithm happens after implementation?

Your Answer | Correct Answer | |
---|---|---|

Binary search | ||

A posteriori analysis | ||

A priori analysis | ||

Linear search |

10.

Which factor helps measure the reusability of an algorithm?

Your Answer | Correct Answer | |
---|---|---|

User adoption | ||

Correctness | ||

Extensibility | ||

Flowchart |

11.

Which search algorithm utilizes the divide-and-conquer strategy?

Your Answer | Correct Answer | |
---|---|---|

Insertion search | ||

Bubble search | ||

Linear search | ||

Binary search |

12.

Which algorithm requires data sorting as its first step?

Your Answer | Correct Answer | |
---|---|---|

Recursive | ||

Linear | ||

Binary | ||

Merge |

13.

What does a time complexity analysis of an algorithm include?

Your Answer | Correct Answer | |
---|---|---|

Memory usage | ||

Efficiency analysis | ||

Screen load times | ||

Worst case |

14.

Which data type do heap sorts work with?

Your Answer | Correct Answer | |
---|---|---|

Tree-based data structure | ||

Array | ||

String | ||

Number |

15.

Which function is used in conjunction with a merge sort algorithm?

Your Answer | Correct Answer | |
---|---|---|

For loop | ||

If statement | ||

Do while loop | ||

Recursive |

16.

Which attribute of a recursive function makes it unique?

Your Answer | Correct Answer | |
---|---|---|

Calls itself | ||

Calls another function | ||

Uses for loops | ||

Uses case statements |

17.

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

Your Answer | Correct Answer | |
---|---|---|

20 | ||

25 | ||

100 | ||

500 |

18.

What is an if statement inside of an if statement referred to as?

Your Answer | Correct Answer | |
---|---|---|

Nested | ||

Internal | ||

Double if | ||

Subscript |

19.

Which search algorithm functions by continually dividing the data set in half until the sought item is found or the data set is exhausted?

Your Answer | Correct Answer | |
---|---|---|

Sequential search | ||

Binary search | ||

Jump search | ||

Linear search |

20.

Which search algorithm has the best performance when the data set is sorted?

Your Answer | Correct Answer | |
---|---|---|

Sequential search | ||

List search | ||

Interval search | ||

Linear search |

21.

Which term describes a way of organizing, storing, and performing operations on data?

Your Answer | Correct Answer | |
---|---|---|

Data structure | ||

Vertex | ||

Record | ||

Graph |

22.

Which data structure is used to implement a dictionary data type?

Your Answer | Correct Answer | |
---|---|---|

Heap | ||

Hash table | ||

List | ||

Queue |

23.

Which element refers to the numeric positions in a list abstract data type (ADT)?

Your Answer | Correct Answer | |
---|---|---|

Head | ||

Queue | ||

Priority | ||

Indexes |

24.

Which characteristic of a class allows it to be used as an abstract data type (ADT)?

Your Answer | Correct Answer | |
---|---|---|

Overloading | ||

Instantiation | ||

It consists of variables and methods. | ||

Overriding |

25.

What is the result when 6 is enqueued to the queue 7,9,8 (with 7 as the front)?

Your Answer | Correct Answer | |
---|---|---|

6,7,9,8 | ||

7,9,8,6 | ||

6,7,9 | ||

7,9,6 |

26.

Which value would be returned from executing the dequeue operation on the queue 7,9,8 (with 7 as the front)?

Your Answer | Correct Answer | |
---|---|---|

7,9,8 | ||

9 | ||

7 | ||

8 |

27.

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 ()

Your Answer | Correct Answer | |
---|---|---|

5,6,7 | ||

7,6,5 | ||

8,6,5 | ||

9,8,6 |

28.

What will be the new state of the queue 7,9,8 (with 7 as the front) after the enqueue (3) operation?

Your Answer | Correct Answer | |
---|---|---|

7,9,8,3 | ||

3,7,9,8 | ||

3,9,8 | ||

7,9,3 |

29.

Which format is used to store data in a hash table?

Your Answer | Correct Answer | |
---|---|---|

Graph | ||

Array | ||

ArrayList | ||

Doubly linked lists |

30.

Which term refers to a data structure that groups related items of data together?

Your Answer | Correct Answer | |
---|---|---|

Pointer | ||

Graph | ||

Record | ||

Hash table |

31.

Which data structure is used to store unordered items by mapping each item to a location in an array?

Your Answer | Correct Answer | |
---|---|---|

Stack | ||

List | ||

Dictionary | ||

Hash table |

32.

What is the advantage that a linked list has over an array?

Your Answer | Correct Answer | |
---|---|---|

Grows and shrinks as needed | ||

Allows for random access | ||

Less memory needed for each element | ||

Faster search time |

33.

What would be the best data structure for a hash table with simple chaining?

Your Answer | Correct Answer | |
---|---|---|

A binary tree | ||

A doubly linked list | ||

A singly linked list | ||

An array |

34.

How many leaf nodes does this tree have?

Your Answer | Correct Answer | |
---|---|---|

One | ||

Two | ||

Three | ||

Four |

35.

What is the root node for this tree?

Your Answer | Correct Answer | |
---|---|---|

Anne | ||

Zara | ||

Savannah | ||

Peter |

36.

What is the height of this tree?

Your Answer | Correct Answer | |
---|---|---|

Four | ||

One | ||

Three | ||

Two |

37.

Which data structure is the most dynamic in storing data items of varying lengths?

Your Answer | Correct Answer | |
---|---|---|

Tuple | ||

List | ||

String | ||

Char |

38.

What is the resulting stack when the push(1) function is implemented on this stack yield?

8,9,3,5(top is 8)

Your Answer | Correct Answer | |
---|---|---|

8,9,3,5,1 | ||

8,9,3,5 | ||

1,8,9,3,5 | ||

8,9,3,1 |

39.

What will the peek() operation from this stack return?

8,9,3,5(top is 8)

Your Answer | Correct Answer | |
---|---|---|

4 | ||

1 | ||

3 | ||

8 |

40.

What is the set that results from set1 intersection set2, given these sets?

set1={69,82,47}

set2={11,82}

Your Answer | Correct Answer | |
---|---|---|

{82} | ||

{69,82,47,11} | ||

{69,82,47} | ||

{11,82} |

41.

How many vertices does this graph have?

Your Answer | Correct Answer | |
---|---|---|

Four | ||

Three | ||

Five | ||

Two |

42.

What is the adjacency list for node 8 in this graph?

Your Answer | Correct Answer | |
---|---|---|

10,7,9,3 | ||

10,11,7,9,3 | ||

11,7,9,3 | ||

7,9,3 |

43.

What is the order of these functions by growth rate?

2/N,37,2^{N},N log(N^{2}),N^{2}

Your Answer | Correct Answer | |
---|---|---|

2/N< 37<N log(N^{2}) <N^{2}<2^{N} | ||

2/N< 37<N^{2}<2^{N}<N log(N^{2}) | ||

N log(N^{2}) <2/N< 37< N^{2}<2^{N} | ||

2/N<N log(N^{2}) <N^{2}<2^{N}< 37 |

44.

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]

Your Answer | Correct Answer | |
---|---|---|

0 | ||

10 | ||

11 | ||

121 |

45.

What is the first element visited in this list when binary searching for the number 7?

[6,7,8,9,11,15,20]

Your Answer | Correct Answer | |
---|---|---|

6 | ||

9 | ||

11 | ||

20 |

46.

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?

Your Answer | Correct Answer | |
---|---|---|

3 | ||

6 | ||

32 | ||

64 |

47.

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?

Your Answer | Correct Answer | |
---|---|---|

0 | ||

3 | ||

6 | ||

4 |

48.

What is the runtime complexity of the algorithm O(N^N + 1)?

Your Answer | Correct Answer | |
---|---|---|

Logarithmic | ||

Linear | ||

Quadratic | ||

Exponential |

49.

What is the runtime complexity for the expression 305 + O(325*N)?

Your Answer | Correct Answer | |
---|---|---|

O(N^2) | ||

N^325 | ||

O(N^N) | ||

O(N) |

50.

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

Your Answer | Correct Answer | |
---|---|---|

O(3) | ||

O(N^2) | ||

O(N) | ||

O(N^3) |

51.

Which term describes an abstract data type (ADT) that Python uses?

Your Answer | Correct Answer | |
---|---|---|

Array | ||

Numeric | ||

String | ||

Char |

52.

Which abstract data type (ADT) is characterized by the LIFO (last in, first out) principle?

Your Answer | Correct Answer | |
---|---|---|

Array | ||

Stack | ||

Queue | ||

List |

53.

Which queue operation removes an item from the front of the queue?

Your Answer | Correct Answer | |
---|---|---|

dequeue | ||

enqueue | ||

push | ||

peek |

54.

Which function in Python returns the number of times the desired value is found in a tuple?

Your Answer | Correct Answer | |
---|---|---|

index() | ||

len() | ||

count() | ||

pop() |

55.

Which function in Python is used to find a specific value in a tuple?

Your Answer | Correct Answer | |
---|---|---|

index() | ||

len() | ||

print() | ||

dict() |

56.

Which Python list function will remove all items from a list?

Your Answer | Correct Answer | |
---|---|---|

clear() | ||

remove() | ||

pop() | ||

extend() |

57.

Which abstract data type (ADT) allows operations at one end only?

Your Answer | Correct Answer | |
---|---|---|

Stack | ||

List | ||

Queue | ||

String |

58.

Which Python list function removes the first instance of the specified element?

Your Answer | Correct Answer | |
---|---|---|

stack() | ||

pop() | ||

remove() | ||

extend() |

59.

How does the insertion sort algorithm sort through a list?

Your Answer | Correct Answer | |
---|---|---|

By iterating through the sorted list while placing each value into its correct sorted position within the list | ||

By comparing the target value to the element in the middle of the list | ||

By performing an in-place comparison of the items in the list | ||

By performing the divide and conquer approach, which separates the list into two smaller arrays for comparison |

60.

What is the average runtime complexity of the merge sort algorithm?

Your Answer | Correct Answer | |
---|---|---|

O(N) | ||

O(N^) | ||

O(log(N)) | ||

O(N*log(N)) |

61.

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)

Your Answer | Correct Answer | |
---|---|---|

9 | ||

4 | ||

6 | ||

7 |

62.

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)

Your Answer | Correct Answer | |
---|---|---|

111 | ||

28 | ||

71 | ||

51 |

63.

Which tool in Python is used to implement a deque ADT?

Your Answer | Correct Answer | |
---|---|---|

Abstraction | ||

String | ||

Collections | ||

Robust |

64.

Which function in Python is used to delete one item on the right side of the deque?

Your Answer | Correct Answer | |
---|---|---|

extend() | ||

pop() | ||

insert() | ||

index() |

65.

Which function determines that a linked list contains no data?

Your Answer | Correct Answer | |
---|---|---|

IsEmpty() | ||

peek() | ||

insert() | ||

put() |

66.

What are classes composed of that perform the actions of an application?

Your Answer | Correct Answer | |
---|---|---|

Databases | ||

JSON | ||

Methods | ||

XML |

67.

Which loop type will always be done at least once?

Your Answer | Correct Answer | |
---|---|---|

For | ||

Do while | ||

While | ||

Foreach |

68.

How would a strongly typed language create an integer variable?

Your Answer | Correct Answer | |
---|---|---|

Var myVar | ||

int myVar | ||

String myVar | ||

let big: number=0 |

69.

Which component of a case statement would be considered a fall back in case no other parameters are met?

Your Answer | Correct Answer | |
---|---|---|

Else | ||

Default | ||

Break | ||

Continue |

70.

Which operator is a type of assignment operator?

Your Answer | Correct Answer | |
---|---|---|

+ | ||

+= | ||

== | ||

|| |