← Atlassian Interview Insights

Atlassian·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jul 2026

Summary

Atlassian software engineer interview with a system design coding problem focused on building an agent-rating service. The core challenge was less about getting something working and more about justifying your data structure choices under follow-up pressure.

Questions Asked (1)

Q1

Design and implement an agent-rating service with two operations: one to record a score (1-5) for a named agent and keep a running average, and another to return all agents ranked by average score descending. How do you keep this efficient?

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

I jumped straight to the brute force because I wanted something on the board fast.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then propose a data structure that maintains a running average per agent (e.g., total score and count) and a sorted collection for ranking. Discuss trade-offs between different approaches (e.g., sorting on demand vs. maintaining sorted order) and choose one that balances efficiency for the expected read/write patterns.

Pro tip: Mention that you would use a balanced binary search tree (like a TreeMap) keyed by average score to keep agents sorted, enabling O(log n) updates and O(1) retrieval of the full ranking, but also discuss the trade-off of handling ties and the need for a secondary index.

1. Clarify Requirements

Ask about expected read/write ratio, number of agents, score distribution, and whether the ranking needs to be real-time or can be eventually consistent.

2. Design Data Structures

Propose storing per-agent total score and count for O(1) average calculation, and a sorted data structure (e.g., balanced BST or skip list) keyed by average score for efficient ranking.

3. Implement Operations

For recording a score: update total and count, compute new average, and update the sorted structure (remove old entry, insert new). For ranking: traverse the sorted structure in descending order.

4. Analyze Complexity

Discuss time and space complexity: O(1) for score update (excluding sorted structure update), O(log n) for sorted structure update, O(n) for retrieval of all agents, and O(n) space.

5. Discuss Trade-offs and Extensions

Compare with alternative approaches (e.g., sorting on demand, using a heap, or a database with indexes) and mention scalability considerations like sharding or caching.

Key Points to Mention

  • Running average calculation using total score and count to avoid storing all scores.
  • Use of a balanced binary search tree (e.g., TreeMap in Java) or skip list to maintain sorted order by average score.
  • Handling ties in average scores (e.g., secondary sort by agent name or insertion order).
  • Time complexity: O(log n) for updates, O(n) for retrieving all agents, and O(1) for average calculation.
  • Space complexity: O(n) for storing agent data and sorted structure.
  • Trade-offs: sorting on demand is O(n log n) per query but simpler; maintaining sorted order is more efficient for frequent reads.

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