← Atlassian Interview Insights

Atlassian·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Atlassian Data Scientist interview with a coding-heavy system design problem. The question was more engineering-flavored than I expected for a DS role, which threw me off a bit.

Questions Asked (1)

Q1

Implement a function that takes a list of URLs (one per second) and returns '200' or '429' for each, enforcing two rate limits per address: no more than 5 requests in any 30-second window, and no more than 2 in any 5-second window.

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

I knew sliding window conceptually but freezing up on the dual-window constraint cost me time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the problem: the function processes a stream of URLs, one per second, and must decide for each whether to allow (200) or reject (429) based on per-address rate limits. Then, design a solution using a sliding window or token bucket approach, maintaining per-address request timestamps, and check both limits before allowing a request. Finally, discuss trade-offs between memory usage and accuracy, and consider edge cases like bursts and concurrency.

Pro tip: Emphasize that the two limits must be enforced simultaneously, and that a request is allowed only if it satisfies both. Also, mention that using a deque per address to store timestamps is efficient for sliding window checks.

1. Clarify requirements and constraints

Confirm that the function receives URLs one per second, and must return '200' or '429' for each. Clarify that limits are per address (e.g., domain or IP) and that both limits apply concurrently.

2. Choose a data structure

Use a hash map to store per-address request timestamps. For each address, maintain a deque (or list) of timestamps of allowed requests within the last 30 seconds.

3. Implement sliding window checks

For each incoming request, remove timestamps older than 30 seconds. Then check if the number of requests in the last 30 seconds is < 5 and in the last 5 seconds is < 2. If both, allow and append current timestamp; else reject.

4. Handle edge cases and concurrency

Consider what happens if multiple requests arrive simultaneously (though problem says one per second). Discuss memory growth and cleanup of old addresses. Optionally, mention token bucket as an alternative.

5. Analyze complexity and trade-offs

Time complexity per request is O(1) amortized (since we only remove old timestamps). Space is O(N) where N is number of active addresses. Discuss trade-offs between exact sliding window and approximate methods.

Key Points to Mention

  • Sliding window vs. fixed window vs. token bucket algorithms
  • Per-address state management using hash map and deque
  • Simultaneous enforcement of both rate limits
  • Time and space complexity analysis
  • Handling of old timestamps and memory cleanup
  • Potential concurrency issues if requests are not strictly sequential

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