← All Epic Skills Assessment Flashcard Decks

Algorithmic Problem Solving Flashcards

7 cards from real Epic Skills Assessment practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Algorithmic Problem Solving flashcards as text
  1. Which algorithm strategy makes the locally optimal choice at each step without reconsidering past decisions?

    Answer: Greedy

    Greedy algorithms commit to the best immediate option at each step, which works when local optima lead to a global optimum.

  2. What is a 'sentinel value' used for in algorithms?

    Answer: A placeholder that simplifies boundary condition checks

    A sentinel is a special value (e.g., −∞ or null) placed at array boundaries so the main loop never needs to check for edge cases explicitly.

  3. In the context of recursion, what causes a stack overflow?

    Answer: Infinite or excessively deep recursive calls that exhaust call stack memory

    Each recursive call pushes a frame onto the call stack; without a reachable base case or with very deep recursion, memory is exhausted.

  4. Which traversal visits a binary tree's nodes in ascending order when the tree is a BST?

    Answer: In-order

    In-order traversal (left → root → right) visits BST nodes in sorted ascending order.

  5. What is the purpose of a 'two-pointer' technique in array problems?

    Answer: To reduce time complexity by maintaining two indices that move toward each other

    Two pointers placed at opposite ends (or at specific offsets) allow many array problems to be solved in O(n) instead of O(n²).

  6. Which of the following is NOT a valid reason to choose an iterative solution over a recursive one?

    Answer: The iterative version always has better time complexity

    Iteration and recursion can express the same algorithms; iterative versions don't automatically have better time complexity.

  7. What does 'amortized O(1)' mean for a dynamic array's append operation?

    Answer: The average cost per append across all operations is O(1), even though occasional resizes cost more

    Occasional O(n) resizes are rare enough that the total cost spread over n appends averages to O(1) per operation.