AWS Certified Data Engineer Associate DEA-C01 Practice Question
A data engineer is generating an AWS Step Functions workflow from a dependency table containing up to 10,000 tasks, each with at most 30 downstream dependencies. The engineer must store the directed acyclic graph in memory inside a 512 MB Lambda function and run a topological sort in O(V+E) time. Which in-memory representation best meets these requirements?
A nested dictionary that maps each source task ID to a dictionary of destination IDs set to true.
An adjacency list implemented as a dictionary that maps each task ID to a list of its dependent task IDs.
A single list containing one JSON object for every edge, scanned each time the graph is traversed.
A 10,000 × 10,000 boolean adjacency matrix stored in memory.
A sparse graph with far fewer edges than vertices-squared is most memory-efficient when stored as an adjacency list. Implementing the list as a single dictionary whose keys are task IDs and whose values are Python lists of neighboring task IDs requires O(V+E) space-about 10,000 keys and at most 300,000 integers-well within the 512 MB limit. Depth-first or Kahn topological sorting can traverse this structure in O(V+E) time. An adjacency matrix allocates O(V²) space (≈100 million booleans) and would exceed memory. A list of JSON edge objects or a nested dict-of-dicts adds heavy per-edge object overhead, wasting memory without improving traversal speed.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is an adjacency list and why is it efficient for sparse graphs?
Open an interactive chat with Bash
How does topological sorting work in a directed acyclic graph (DAG)?
Open an interactive chat with Bash
Why is an adjacency matrix not suitable for this scenario?
Open an interactive chat with Bash
AWS Certified Data Engineer Associate DEA-C01
Data Ingestion and Transformation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .