← All CCP Flashcard Decks

CCP Data Structures & Abstract Data Types Flashcards

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

Read the first 6 CCP Data Structures & Abstract Data Types flashcards as text
  1. In a binary tree, a node with no children is called a:

    Answer: Leaf

    A leaf node is a node in a binary tree that has no left or right child.

  2. A hash table resolves collisions using chaining by storing colliding elements in a:

    Answer: Linked list at each bucket

    Chaining stores all keys that hash to the same bucket in a linked list attached to that bucket.

  3. What is the average-case time complexity for searching in a balanced binary search tree (BST)?

    Answer: O(log n)

    A balanced BST halves the search space at each level, yielding O(log n) average-case search time.

  4. Which graph representation uses a 2D matrix to indicate edges between vertices?

    Answer: Adjacency matrix

    An adjacency matrix uses an n×n boolean (or weighted) matrix where entry [i][j] indicates an edge from vertex i to vertex j.

  5. A priority queue dequeues elements based on:

    Answer: Assigned priority value

    A priority queue always removes the element with the highest (or lowest) priority value, regardless of insertion order.

  6. Which property of a binary heap ensures the parent node's key is always greater than or equal to its children's keys?

    Answer: Max-heap property

    The max-heap property states that every parent node has a key ≥ its children, placing the maximum at the root.