← Atlassian Interview Insights

Atlassian·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Jun 2026

Summary

Atlassian system design round that went deep on graph modeling and dynamic LCA/LCO queries. The problem felt approachable at first glance but the DAG wrinkle and mutation requirements made it genuinely hard to reason through cleanly.

Questions Asked (4)

Q1

Design a data model for an organization structure where orgs form a DAG (not a tree), employees can belong to multiple orgs at once, and both org memberships and parent relationships can change at runtime.

Data ModelingSystem Design
Author's notes

I started with the obvious adjacency list and it felt fine until they pushed on multi-parent orgs.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and scale, then propose a relational schema with separate tables for organizations, employees, memberships, and parent-child edges. Address how to enforce DAG constraints and handle runtime changes with efficient queries and integrity checks.

Pro tip: Mention that DAGs require cycle prevention on parent edge insertion, and propose a recursive CTE or topological check to validate. Also note that many-to-many memberships and DAG edges are independent, so model them as separate join tables.

1. Clarify requirements and scale

Ask about expected number of orgs, employees, memberships, and read/write patterns to guide design choices (e.g., SQL vs NoSQL, indexing).

2. Design core entities and relationships

Define tables for organizations, employees, memberships (employee-org many-to-many), and org_parents (DAG edges). Include necessary attributes like timestamps for auditing.

3. Enforce DAG and handle runtime changes

Describe how to prevent cycles when adding parent edges (e.g., recursive check or topological sort) and how to efficiently update memberships and edges without breaking integrity.

4. Optimize for queries and scale

Discuss indexing strategies, recursive queries for ancestry/descendants, and potential caching or denormalization for frequent reads.

5. Address consistency and concurrency

Explain how to handle concurrent updates, transactions, and eventual consistency if using distributed storage.

Key Points to Mention

  • Separate tables for orgs, employees, memberships (many-to-many), and parent-child edges (DAG).
  • Cycle prevention when adding parent edges: use recursive CTE or topological sort to check for cycles.
  • Indexing on foreign keys and edge columns for efficient traversal and lookups.
  • Recursive queries (e.g., WITH RECURSIVE) to find ancestors/descendants or all orgs for an employee.
  • Handling runtime changes: soft deletes or versioning for audit, and transactions for atomic updates.
  • Scalability considerations: sharding, caching, or graph databases if traversal becomes bottleneck.

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

Q2

Given the mutable DAG structure, how would you implement an LCO query (lowest common organization for two employees) and what are the trade-offs between recomputing on each query versus maintaining incremental ancestor structures?

Algorithms & Data StructuresTechnical Trade-offsSystem Design
Author's notes

This is where I spent most of my time and also where I fumbled a bit.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem: define LCO in a mutable DAG, discuss possible algorithms (e.g., binary lifting, Euler tour + RMQ, or set intersection of ancestor paths), and then compare recomputation vs. incremental maintenance. Structure your answer around trade-offs in time/space complexity, update frequency, and query patterns.

Pro tip: Mention that in practice, a hybrid approach (e.g., caching with invalidation on updates) often works best, and relate it to real-world systems like org charts where updates are infrequent but queries are frequent.

1. Clarify the problem and constraints

Define LCO precisely: the lowest node that is an ancestor of both employees. Ask about update frequency, query frequency, and DAG properties (e.g., single root, multiple parents).

2. Propose recomputation approach

For each query, compute ancestors of both nodes (e.g., via DFS/BFS) and find the lowest common one. Analyze time complexity O(V+E) per query and space O(V).

3. Propose incremental ancestor structures

Maintain dynamic data structures like binary lifting tables or Euler tour + RMQ with updates. Discuss update cost (e.g., O(log V) or O(V)) and query cost (e.g., O(log V)).

4. Compare trade-offs

Contrast recomputation (simple, no update overhead, slow queries) vs. incremental (fast queries, complex updates, higher memory). Consider hybrid caching.

5. Recommend based on use case

Suggest a solution based on expected query/update ratio, e.g., if updates are rare, incremental is better; if queries are rare, recompute.

Key Points to Mention

  • Definition of LCO in a DAG with multiple parents (not just a tree).
  • Algorithms: binary lifting, Euler tour + RMQ, or set intersection of ancestor lists.
  • Time/space complexity for recomputation vs. incremental maintenance.
  • Handling updates: how to efficiently update ancestor structures (e.g., link-cut trees, dynamic trees).
  • Caching strategies and invalidation on updates.
  • Real-world analogy: organizational hierarchies with frequent queries and infrequent reorganizations.

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

Q3

How do you handle consistency between reads and writes for LCO queries when org memberships and parent relationships are being mutated concurrently?

System DesignTechnical Trade-offs
Author's notes

Honestly a question I wasn't expecting in this depth for what felt like a coding-adjacent round.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the specific LCO queries and the consistency requirements (e.g., strong vs. eventual) for org memberships and parent relationships. Then discuss trade-offs between consistency models and propose a concrete strategy such as transactional updates with versioning or read-your-writes guarantees, highlighting how to handle concurrent mutations.

Pro tip: Acknowledge that perfect consistency may not be necessary for all queries; propose a tiered approach where critical operations use strong consistency while others tolerate eventual consistency, showing you balance correctness with performance and scalability.

1. Clarify requirements and constraints

Ask about the expected read/write patterns, latency requirements, and whether strong consistency is mandatory for all LCO queries or only for specific operations.

2. Identify consistency challenges

Explain how concurrent mutations to org memberships and parent relationships can lead to anomalies like stale reads, lost updates, or inconsistent hierarchies.

3. Evaluate consistency models

Compare options such as strong consistency (e.g., serializable transactions), eventual consistency, and read-your-writes, discussing their trade-offs in terms of latency, availability, and complexity.

4. Propose a concrete solution

Suggest a design like using versioned records, optimistic concurrency control, or a distributed transaction protocol, and explain how it ensures consistency for LCO queries during concurrent mutations.

5. Address failure and scalability

Discuss how the solution handles failures, network partitions, and scaling, and mention monitoring or fallback mechanisms to maintain consistency.

Key Points to Mention

  • CAP theorem and the trade-offs between consistency and availability
  • Use of versioning or timestamps to detect and resolve conflicts
  • Optimistic vs. pessimistic concurrency control
  • Read-your-writes consistency for user-facing queries
  • Transactional isolation levels (e.g., serializable, snapshot isolation)
  • Caching strategies and invalidation to reduce stale reads

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

Q4

Given expected read/write ratios, which data structure or approach wins for the LCO problem, and how does that change if the system is read-heavy versus write-heavy?

Technical Trade-offsSystem Design
Author's notes

Pretty clean question to end on.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the LCO problem and expected read/write ratios, then compare candidate data structures (e.g., hash map, balanced tree, trie, array) on time/space complexity and concurrency. Explain how the optimal choice shifts from read-optimized (e.g., hash map with caching) to write-optimized (e.g., log-structured or LSM tree) as the ratio changes.

Pro tip: Quantify trade-offs with concrete numbers (e.g., 'At 10:1 read:write, a hash map with read-through cache yields O(1) reads; at 1:10, a write-optimized structure like a log or LSM tree avoids read-modify-write overhead'). This shows you think in terms of real-world performance, not just theory.

1. Clarify the LCO problem and constraints

Define what LCO stands for in this context (e.g., Least Recently Used, Lock-Free, or a specific coding problem) and confirm the expected read/write ratio, data size, and latency requirements.

2. Identify candidate data structures

List plausible options such as hash maps, balanced BSTs, tries, arrays, linked lists, or log-structured merge trees, and note their fundamental read/write complexities.

3. Analyze read-heavy scenario

For read-heavy workloads, prioritize structures with fast lookups (e.g., hash map O(1), balanced tree O(log n)) and consider caching, replication, or read-optimized indexes.

4. Analyze write-heavy scenario

For write-heavy workloads, favor structures that minimize write amplification and locking (e.g., append-only logs, LSM trees, or partitioned writes) even if reads become slower.

5. Recommend and justify with trade-offs

Propose a specific approach for each regime, quantifying trade-offs (e.g., throughput, latency, memory) and mentioning hybrid or adaptive solutions if applicable.

Key Points to Mention

  • Time complexity of core operations (insert, delete, lookup) for each data structure
  • Space overhead and memory footprint differences
  • Concurrency and locking behavior under high read or write load
  • Caching strategies (e.g., read-through, write-behind) and their impact
  • Real-world examples like LSM trees (write-optimized) vs. B-trees (read-optimized)
  • How the ratio threshold (e.g., 10:1) influences the decision

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