← Atlassian Interview Insights

Atlassian·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Atlassian SWE interview with a design-heavy coding problem that looked straightforward but had a lot of follow-up potential baked in. The discussion went longer than I expected once we got into trade-offs.

Questions Asked (1)

Q1

Design and implement a small system where records of (agent_id, rating) arrive over time. The system should compute each agent's average rating and return all agents sorted by average rating descending, with agent_id ascending as a tie-breaker.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

My first instinct was to store raw records and recompute averages on every query, which the interviewer let me talk through before nudging me to think about scale.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (e.g., data volume, update frequency, whether queries are on-demand or continuous). Then propose a solution using a hash map to store per-agent aggregates (sum and count) and a sorted structure (e.g., balanced BST or sorted list) to maintain the ranking, discussing trade-offs between update and query costs. Finally, walk through the implementation details and analyze time/space complexity.

Pro tip: Demonstrate awareness of real-world constraints: if updates are frequent and queries are rare, a simple map with on-demand sorting might suffice; if queries are frequent, maintaining a sorted structure is better. Mentioning this trade-off shows maturity in system design.

1. Clarify Requirements and Constraints

Ask about data volume, update frequency, query frequency, and whether the system needs to support concurrent updates. This determines the appropriate data structures and trade-offs.

2. Design Data Structures

Propose a hash map to store each agent's sum and count for O(1) updates, and a sorted data structure (e.g., balanced BST, skip list, or sorted list) to maintain the ranking. Discuss how to handle ties (agent_id ascending).

3. Handle Updates and Queries

Explain how to update the average when a new rating arrives: update sum and count, then update the sorted structure. For queries, return the sorted list. Discuss whether to sort on-demand or maintain sorted order.

4. Analyze Complexity and Trade-offs

Compare approaches: on-demand sorting (O(n log n) per query) vs. maintaining sorted order (O(log n) per update). Consider memory overhead and concurrency if needed.

5. Implement and Test

Write clean code for the chosen approach, handling edge cases (e.g., new agents, ties). Walk through an example to verify correctness.

Key Points to Mention

  • Use a hash map to store per-agent sum and count for O(1) updates.
  • Maintain a sorted structure (e.g., balanced BST) to keep agents ordered by average descending and agent_id ascending.
  • Discuss trade-offs between on-demand sorting and maintaining sorted order based on update/query frequency.
  • Handle ties by comparing agent_id when averages are equal.
  • Analyze time complexity: O(1) update for aggregates, O(log n) for sorted insertion, O(n) for retrieval.
  • Consider concurrency and scalability if the system needs to handle high throughput.

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