← Atlassian Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Atlassian system design round focused entirely on tree data structures, which sounds narrow until you realize how many directions they can pull it. Heavy emphasis on database schema choices and REST API shape, less on raw coding.

Questions Asked (3)

Q1

Design a hierarchical tree data model that supports adding a node under a given parent and retrieving all descendants of a node. Walk through your REST API design and database schema choices.

System DesignData ModelingTechnical Trade-offs
Author's notes

I went straight to adjacency list because it felt obvious, and the interviewer just nodded and waited.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (read/write ratio, depth, performance needs), then propose a schema (e.g., adjacency list with recursive CTE or closure table) and REST endpoints (POST /nodes/{parentId}/children, GET /nodes/{id}/descendants). Discuss trade-offs between models and justify your choices based on the requirements.

Pro tip: Atlassian values scalability and collaboration; mention how your design handles concurrent updates and large trees, and consider using materialized paths or closure tables for efficient descendant queries.

1. Clarify Requirements

Ask about expected tree size, read/write patterns, and performance constraints to guide your design choices.

2. Choose Data Model

Evaluate adjacency list, closure table, materialized path, or nested sets; pick one and explain trade-offs (e.g., adjacency list is simple but recursive queries can be slow).

3. Design REST API

Define endpoints: POST /nodes/{parentId}/children to add a node, GET /nodes/{id}/descendants to retrieve all descendants; include pagination and filtering options.

4. Detail Database Schema

Show tables and columns (e.g., nodes table with id, parent_id; or closure table with ancestor, descendant, depth) and explain indexing strategies.

5. Discuss Trade-offs and Scalability

Compare models for read vs write performance, storage overhead, and ease of moving subtrees; mention caching or denormalization for large-scale systems.

Key Points to Mention

  • Adjacency list model: simple but recursive queries for descendants can be inefficient at scale.
  • Closure table: fast descendant queries but higher storage and write complexity.
  • Materialized path: efficient subtree queries but path updates on move are costly.
  • RESTful design: use hierarchical resource paths and proper HTTP methods (POST for create, GET for read).
  • Indexing: ensure parent_id or ancestor/descendant columns are indexed for performance.
  • Concurrency: handle simultaneous inserts under the same parent with transactions or optimistic locking.

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

Q2

What are the read and write trade-offs between adjacency list, materialized path, nested set, and closure table storage strategies for trees?

Technical Trade-offsData ModelingAlgorithms & Data Structures
Author's notes

This is where I actually felt okay.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by comparing each strategy's read and write performance for common tree operations like fetching descendants, ancestors, and moving subtrees. Highlight the trade-off between query simplicity (reads) and update complexity (writes), and tie it back to real-world use cases like Jira's issue hierarchy.

Pro tip: Mention that closure tables can be optimized with a depth column to limit ancestor/descendant queries, and that hybrid approaches (e.g., adjacency list + materialized path) are common in production systems like Jira.

1. Define the operations

List the key tree operations: fetch children, fetch all descendants, fetch ancestors, insert node, move subtree, delete node. This sets the evaluation criteria.

2. Analyze each strategy

For each storage strategy, describe its structure and evaluate read/write performance for the operations. Be specific about time complexity and query patterns.

3. Compare trade-offs

Summarize the trade-offs: adjacency list is simple but recursive queries are slow; materialized path is fast for descendants but expensive for moves; nested set is fast for reads but slow for writes; closure table is flexible but storage-heavy.

4. Recommend based on use case

Suggest which strategy fits scenarios like read-heavy vs write-heavy, depth of tree, and need for referential integrity. Relate to Atlassian products if possible.

Key Points to Mention

  • Adjacency list: simple, fast writes (O(1) insert), but reads require recursive CTEs or multiple queries (O(depth) or O(n)).
  • Materialized path: fast descendant reads with LIKE prefix queries, but moving a subtree requires updating paths of all descendants (O(n)).
  • Nested set: fast reads (O(1) for descendants), but writes (insert/move) require updating left/right values of many nodes (O(n)).
  • Closure table: flexible reads and writes, but storage overhead O(n^2) in worst case; can optimize with depth column.
  • Consider database support: recursive CTEs (PostgreSQL, MySQL 8+) make adjacency list more viable.
  • Hybrid approaches: combine adjacency list for writes and materialized path for reads, or use closure table with depth for efficient queries.

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

Q3

How would you handle edge cases like cycles, deletion of a subtree, moving a subtree to a different parent, and enforcing depth limits?

System DesignTechnical Trade-offsAPI & Integrations
Author's notes

Cycles tripped me up briefly.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the data structure (e.g., tree, graph, or hierarchical data) and the operations involved. Then systematically address each edge case: cycles, deletion, moving subtrees, and depth limits, discussing detection, handling strategies, and trade-offs. Conclude with how you would test and validate these scenarios.

Pro tip: Mention that you would use a parent pointer or maintain a visited set to detect cycles, and that moving a subtree requires updating parent references and possibly rebalancing. Also, consider concurrency and transactional integrity if the structure is shared.

1. Clarify the Data Structure and Operations

Ask questions to understand the exact structure (e.g., tree, DAG, graph) and the operations (insert, delete, move, depth limit). This ensures you address the right edge cases.

2. Cycle Detection and Prevention

Explain how to detect cycles (e.g., DFS with visited set, union-find, or parent pointers) and prevent them during operations like moving a subtree.

3. Subtree Deletion and Moving

Describe how to safely delete a subtree (e.g., recursive deletion, updating parent references) and move a subtree (e.g., detach, update parent pointers, reattach, check for cycles).

4. Enforcing Depth Limits

Discuss strategies to enforce depth limits, such as tracking depth during insertion/move, rejecting operations that exceed the limit, or rebalancing the tree.

5. Testing and Trade-offs

Outline how you would test these edge cases (unit tests, property-based testing) and discuss trade-offs (e.g., performance vs. safety, memory overhead).

Key Points to Mention

  • Cycle detection using DFS with visited set or union-find, and prevention by checking ancestry before moving.
  • Subtree deletion: recursive deletion, updating parent pointers, and handling orphaned nodes.
  • Moving a subtree: detaching, updating parent references, checking for cycles, and ensuring depth limits.
  • Depth limit enforcement: tracking depth, rejecting operations, or rebalancing (e.g., AVL, Red-Black trees).
  • Concurrency and transactional integrity if the structure is shared or persisted.
  • Testing strategies: unit tests for each edge case, property-based testing for invariants.

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