Minimal Recompute Order for a Parametric Feature Timeline

Last updated: November 29, 2026

Quick Overview

A parametric CAD model is a timeline of features where each feature depends on earlier ones. Given the dependency list and the set of features a user just edited, return only the features that must be recomputed, in a valid order that respects dependencies and breaks ties by timeline position, and report cycles.

Autodesk
Coding & Algorithms
Software Engineer
Autodesk
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Medium

0

0

0 solved


A parametric CAD model is a timeline of features where each feature depends on earlier ones. Given the dependency list and the set of features a user just edited, return only the features that must be recomputed, in a valid order that respects dependencies and breaks ties by timeline position, and report cycles.

Fusion's timeline and Inventor's browser regenerate features after an edit, and recomputing everything on a large assembly is too slow. The interviewer checks that the candidate finds the downstream closure first and then topologically sorts only that subgraph.

What the Interviewer Expects
  • Build a parent to child adjacency
  • Find all features reachable from the edited ones with BFS or DFS
  • Topologically sort only the dirty subgraph with Kahn's algorithm
  • Use a min-heap on timeline position for deterministic order
  • Detect and report cycles and missing references
  • State complexity in terms of the dirty subgraph
Key Topics to Cover
Topological sort
Graph traversal
Dependency graphs
Incremental computation
Cycle detection
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • Recompute of a feature fails. Which downstream features should be marked broken versus still computed?
  • How would you parallelize recompute across independent branches?
  • Some edits change a value but not the result geometry. How could you stop propagation early?
  • How does suppressing a feature change the algorithm?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Input: features as (id, parents) in timeline order and edited, a set of ids. Output: the ids to recompute, every parent before its children, ties in timeline order. Features not downstream of an...

High-Level Design

Two phases. First, a BFS from the edited features along child edges gives the dirty set; nothing outside it can change. Second, Kahn's algorithm on the dirty subgraph only, counting in-degree from dir...


Submit Your Answer
Markdown supported

Related Questions