← All AMCAT Flashcard Decks

Data Structures and Algorithms Flashcards

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

Read the first 6 Data Structures and Algorithms flashcards as text
  1. Which of the following is NOT a comparison-based sorting algorithm?

    Answer: Radix Sort

    Radix Sort sorts by individual digits without comparing elements directly, so it is non-comparison based.

  2. The average time complexity of Quick Sort is:

    Answer: O(n log n)

    Quick Sort's average case is O(n log n), though worst case (poor pivot choice) is O(n²).

  3. In a circular queue of size n, how many elements can actually be stored (to distinguish full from empty)?

    Answer: n − 1

    A circular queue typically stores at most n−1 elements to differentiate between the full and empty states.

  4. What is a spanning tree of a graph?

    Answer: A tree that includes all vertices with the minimum number of edges

    A spanning tree connects all vertices of a graph using exactly n−1 edges with no cycles.

  5. Which data structure is used by an operating system to manage function calls and returns?

    Answer: Stack

    The call stack is a stack data structure that tracks function calls, local variables, and return addresses.

  6. Dynamic programming solves optimization problems by:

    Answer: Breaking problems into overlapping subproblems and storing results

    Dynamic programming avoids redundant computation by storing solutions to overlapping subproblems (memoization/tabulation).