Data Structures and Algorithms Flashcards
7 cards from real ECHOCARDIOGRAM practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 7 Data Structures and Algorithms flashcards as text
An echocardiography AI model must select the single best view from a real-time stream of 30 frames per second. Which algorithmic strategy minimizes latency while maintaining acceptable accuracy?
Answer: Sliding window with early-exit on high-confidence prediction
A sliding window with early-exit terminates as soon as a high-confidence frame is detected, reducing average latency without sacrificing reliability on clear views.
What is the space complexity of storing a full adjacency matrix for a graph representing the connectivity of 1,000 cardiac mesh nodes?
Answer: O(n²)
An adjacency matrix for n nodes requires an n×n grid of entries, so space grows as O(n²)—for 1,000 nodes that is 1,000,000 entries.
A technician applies a median filter to a 2D echocardiographic image to reduce speckle noise. What does the median filter algorithm do at each pixel?
Answer: Replaces the pixel with the middle value in its sorted neighborhood
A median filter sorts the intensity values of a pixel's neighborhood and replaces the pixel with the median (middle) value, effectively suppressing outlier speckle noise.
When indexing a large echocardiography database by patient ID using a hash function, what collision resolution strategy chains multiple entries together at each hash bucket?
Answer: Separate chaining with linked lists
Separate chaining stores colliding keys in a linked list (or other structure) at each bucket, allowing multiple patients to share the same hash value.
In dynamic programming applied to cardiac motion segmentation, the 'optimal substructure' property means:
Answer: The optimal global segmentation can be built from optimal subsegmentations of smaller image regions
Optimal substructure means the globally optimal solution is composed of optimal solutions to overlapping sub-problems, which is the key property that makes dynamic programming applicable.
A priority queue is used to schedule echocardiographic post-processing tasks by clinical urgency. Which underlying data structure gives O(log n) insert and O(log n) extract-minimum?
Answer: Min-heap
A min-heap maintains the heap property in O(log n) for both insertion and extraction of the minimum element, making it the standard backing structure for priority queues.
In run-length encoding (RLE) applied to compressing a sector-shaped echocardiographic image, performance is best when the image contains:
Answer: Long consecutive runs of identical or near-identical pixel values
RLE encodes consecutive identical values as a (value, count) pair; it achieves the highest compression ratio when the image has long homogeneous regions.