โ† All B CompE Bachelor of Computer Engineering Flashcard Decks

Bachelor of Computer Engineering Data Structure Flashcards

7 cards from real B CompE Bachelor of Computer Engineering practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Bachelor of Computer Engineering Data Structure flashcards as text
  1. Which tree traversal visits nodes in the order: left subtree, root, right subtree?

    Answer: In-order

    In-order traversal visits left subtree first, then the root, then the right subtree, yielding sorted output for a BST.

  2. What is the worst-case time complexity for searching in an unbalanced Binary Search Tree with n nodes?

    Answer: O(n)

    In the worst case, a BST degrades to a linked list (e.g., sorted insertions), making search O(n).

  3. Which data structure is most appropriate for implementing a priority queue efficiently?

    Answer: Binary heap

    A binary heap supports O(log n) insert and O(log n) extract-min/max, making it ideal for priority queues.

  4. In a max-heap, which property must hold for every node?

    Answer: Each node is greater than or equal to its children

    The max-heap property requires every parent node to be greater than or equal to its children.

  5. What is the time complexity of building a heap from an unsorted array of n elements using the heapify approach?

    Answer: O(n)

    Bottom-up heap construction using heapify runs in O(n) due to the mathematical sum of subtree heights.

  6. Which graph traversal algorithm uses a queue to explore nodes level by level?

    Answer: Breadth-First Search

    BFS uses a queue (FIFO) to visit all neighbors of a node before moving to the next depth level.

  7. What is the space complexity of Depth-First Search on a graph with V vertices and E edges?

    Answer: O(V)

    DFS uses a stack (or recursion stack) that holds at most V vertices in the worst case.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy