โ† All B.S.W.E. Bachelor of Software Engineering Flashcard Decks

Algorithms & Data Structures Flashcards

6 cards from real B.S.W.E. Bachelor of Software Engineering practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 6 Algorithms & Data Structures flashcards as text
  1. What property defines a binary search tree (BST)?

    Answer: Left subtree values are smaller and right subtree values are larger than each node

    A BST ensures each node's left subtree contains only smaller values and the right subtree contains only larger values, enabling O(log n) average search.

  2. What is dynamic programming?

    Answer: An optimization technique solving problems by breaking them into overlapping subproblems and caching results

    Dynamic programming solves problems by breaking them into overlapping subproblems, storing results (memoization) to avoid redundant computation.

  3. What is the time complexity of merge sort in all cases?

    Answer: O(n log n)

    Merge sort guarantees O(n log n) in best, average, and worst cases because it always divides the array in half and merges linearly.

  4. What distinguishes breadth-first search (BFS) from depth-first search (DFS)?

    Answer: BFS visits all neighbors at the current level before going deeper; DFS goes as deep as possible first

    BFS explores a graph level by level using a queue, visiting all nodes at depth d before any node at depth d+1.

  5. What is a linked list?

    Answer: A linear data structure where each node contains data and a pointer to the next node

    A linked list is a chain of nodes where each node stores data and a reference (pointer) to the next node in the sequence.

  6. What does Big O notation describe in algorithm analysis?

    Answer: The upper bound of an algorithm's time or space complexity as input size grows

    Big O notation describes the upper bound of an algorithm's growth rate in time or space relative to input size, ignoring constants.