MASTER EXAM 2026 FULL QUESTIONS
WITH DETAILED SOLUTIONS GRADED A+
◉random.sample(list, x). Answer: Randomly collects x amount of
item from a list
◉Linear Search List Type. Answer: Unordered
◉Linear Search Time Complexity. Answer: O(n), meaning an
algorithm whose execution time or required memory space is
directly proportional to the size of the input
◉Linear Search Explanation. Answer: Each item is compared
sequentially to the target until found / end of list
◉Binary Search List Type. Answer: Ordered
, ◉Binary Search Time Complexity. Answer: O(log(n)), meaning an
algorithm whose execution time or required memory grows
logarithmically with input size (lower complexity than polynomial)
◉Binary Search Explanation. Answer: It works by locating the
midpoint of a list and determining if the target is higher or lower
than the midpoint, continually until found / the list cannot be halved
◉Bubble Sort Time Complexity. Answer: O(n2), meaning an
algorithm whose execution time or required memory space is
proportional to the input size raised to the power of 2
◉Bubble Sort Explanation. Answer: Swaps the position of adjacent
items to order them (so position 0 is checked with 1, then 1 with 2, 2
with 3 etc.) until a pass is made without swaps
◉Merge Sort Time Complexity. Answer: O(n* log(n)), meaning it is
log linear
◉Merge Sort Explanation. Answer: Continuously splits lists in half
until all elements are in separate lists. Then the adjacent lists are
compared, the smallest element from each list are compared and
ordered in a new list