0%
0 / 15 answered

Data Abstraction Practice Test

15 Questions
Question
1 / 15
Q1

Based on the scenario described, a Traffic Management System must coordinate multiple intersections. Raw sensor counts arrive per lane, but the system abstracts each intersection into a single object with fields: totalIncomingCars, dominantDirection, and congestionLevel. An algorithm then prioritizes intersections by congestionLevel and adjusts only the top three most congested intersections each cycle, keeping the rest on default timing to save computation.

Pseudocode:


ints <- MAP(allIntersections, SUMMARIZE)

hotspots <- TOP_K(ints, by = congestionLevel, k = 3)

FOR each h IN hotspots:

  ADJUST_SIGNALS(h, dominantDirection)

Considering the example provided, how does the system abstract data to improve efficiency?

Question Navigator