ALGORITHMS OBJECTIVE V1 AND V2
FINAL TEST 2026 QUESTIONS WITH
CORRECT ANSWERS GRADED A+
◍ A data structure for representing connections among items, and consists of
vertices connected by edges..
Answer: graph
◍ What is an Advantage That a Linked List Has Over an Array?.
Answer: Grows and shrinks as needed
◍ Direct Access Table.
Answer: A hash table with a direct hash function.
◍ Binary Search Algorithm.
Answer: starts at the middle of a sorted data set of numbers and eliminates
half of the data; this process repeats until the desired value is found or all
elements have been eliminated
◍ Space complexity.
Answer: Quantity of space (in memory) required to solve a problem &
produce an output
◍ A collection of key/value pairs where the key can only exist once in the
collection.
Answer: Associative Array
◍ What is the worst case complexity for searching a BST, where H is the tree
height?.
Answer: O(H)
,◍ 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?.
Answer: 6
◍ Radix sort.
Answer: A sorting algorithm designed specifically for integers. The
algorithm makes use of a concept called buckets and is a type of bucket sort.
◍ Gap Value.
Answer: A positive integer representing the distance between elements in an
interleaved list. If an element is at index i, the next element is at index i +
this value.
◍ Complete.
Answer: A binary tree if all levels, except possibly the last level, contain all
possible nodes and all nodes in the last level are as far left as possible.
◍ Factors of an Algorithm.
Answer: 1. Modularity (can be broken down)2. Correctness3.
Maintainability (no major changes when redefining the algorithm)4.
Functionality5. Robustness (ability to define problem clearly)6. User
friendly7. Simplicity8. Extensibility (Future developers can understand it &
build upon it)
◍ A large set of floating point numbers that are in range from 0.0 to 1.0 and
are uniformly distributed across the range need to be sorted. Which sort
procedure is useful when the input is uniformly distributed over the range?.
Answer: Bucket
◍ This represents an item in a graph..
Answer: vertex
◍ What is the typical run time for an insertion sort?.
Answer: O(n^2)
◍ abstraction.
Answer: high-level view, hiding low-level detail
, ◍ At most how many children can each node have in a binary tree?.
Answer: two
◍ Constant.
Answer: O(5) has a _____ runtime complexity.
◍ Given a set of numeric data and two declared variables: small and max,
what is the logical first step in an algorithm that finds the smallest number?.
Answer: Checking that the list contains at least one number
◍ Full.
Answer: A binary tree if every node contains 0 or 2 children.
◍ Tuple.
Answer: A data type behaves similar to a list but is immutable - once created
the elements cannot be changed.
◍ Selection sort.
Answer: A sorting algorithm that treats the input as two parts, a sorted part
and an unsorted part, and repeatedly selects the proper next value to move
from the unsorted part to the end of the sorted part.
◍ Implementing a stack in python (Linear data structure).
Answer: Can be implemented in Python using a class with a single
LinkedList data member. The class has two methods, push() and pop().
push() adds a node to the top of the stack's list by calling LinkedList's
prepend() method. *New elements are place on the top of the stack, not at
the bottom of the stack.pop() removes the head of the stack's list by calling
the LinkedList's remove_after() method and then returns the removed node.
◍ What does a list traversal algorithm do in the context of a linked list?.
Answer: It visits all nodes in the list once and performs an operation on each
node
◍ 514.
Answer: What is the output of the pseudocode below if the variables
declared in the main program are global?Main Declare X as Integer, Y as