← Fuse Energy Interview Insights

Fuse Energy·Software Engineer·Technical Phone Screen·Intermediate

IntermediatePrefer not to say
Jun 2026

Summary

Got a system design coding question for a Software Engineer role at Fuse Energy. It was a meaty in-memory spreadsheet problem with dependency tracking, cycle detection, and undo support. More algorithmic depth than I expected for what felt like a mid-level role.

Questions Asked (1)

Q1

Design an in-memory spreadsheet that supports Set, Sum, Get, and Undo operations on cells and ranges, where formula cells are reactive, duplicate references count multiple times, and Sum must reject any operation that would create a cycle in the dependency graph.

System DesignAlgorithms & Data StructuresData Modeling
Author's notes

This one took me a while to even parse fully.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a data model with cells storing raw values or formulas, and a dependency graph for reactive updates. Explain how each operation works, focusing on cycle detection during Sum and efficient undo using command pattern or snapshots.

Pro tip: Mention that cycle detection can be done via DFS during dependency graph updates, and that undo can be implemented by storing inverse operations or snapshots—choose based on memory vs. time trade-offs.

1. Clarify Requirements and Constraints

Ask about expected scale, concurrency, persistence, and whether formulas can reference ranges. Confirm that duplicate references count multiple times and that Sum must reject cycles.

2. Design Data Model

Propose a Cell class with value and formula, and a dependency graph (e.g., adjacency list) to track dependencies between cells and ranges. Consider using a map for cell storage.

3. Implement Operations

Describe Set (update cell, propagate changes), Get (return computed value), Sum (evaluate range, check for cycles), and Undo (revert last operation). Explain reactive updates via topological sort or DFS.

4. Handle Cycle Detection

During Sum, before committing, perform DFS from the target cell to detect if any dependency leads back to it. If a cycle is found, reject the operation.

5. Implement Undo

Use a command pattern to store each operation and its inverse, or maintain snapshots of the spreadsheet state. Discuss trade-offs between memory and performance.

Key Points to Mention

  • Dependency graph representation (adjacency list or matrix) and how to update it on Set.
  • Reactive evaluation: propagate changes to dependent cells using topological order or DFS.
  • Cycle detection algorithm: DFS with visited set during Sum, rejecting if cycle found.
  • Handling duplicate references: ensure each reference is counted separately in Sum.
  • Undo mechanism: command pattern with inverse operations or snapshots, and how to handle multiple undos.
  • Complexity analysis: time and space for each operation, especially cycle detection and undo.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.