← Atlassian Interview Insights

Atlassian·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Atlassian coding round focused entirely on building a route registry from scratch, with a follow-up that added wildcard matching. Pretty solid problem, two distinct parts, and the design decisions in part two are where things got interesting.

Questions Asked (2)

Q1

Implement a route registry that maps URL-style paths to handler functions, supporting exact path matching with add() and lookup() methods.

Algorithms & Data StructuresSystem Design
Author's notes

Part one felt straightforward, just a hash map from path string to handler.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements: exact matching, case sensitivity, trailing slashes, and expected time complexity. Then propose a hash map (dictionary) for O(1) average lookup, with a simple add(path, handler) and lookup(path) returning the handler or None. Discuss edge cases like duplicate registration and path normalization.

Pro tip: Mention that while a hash map is optimal for exact matching, you'd consider a trie if prefix matching or wildcards were needed later—showing you think about extensibility and trade-offs.

1. Clarify requirements and constraints

Ask about exact matching semantics, case sensitivity, trailing slashes, duplicate paths, and expected performance. Confirm the interface: add(path, handler) and lookup(path).

2. Choose the right data structure

Select a hash map (e.g., dict in Python) for O(1) average-time add and lookup. Explain why it's ideal for exact matching and mention alternatives like a trie for prefix matching.

3. Design the API and error handling

Define add() to store the handler and handle duplicates (overwrite or raise). Define lookup() to return the handler or a sentinel (e.g., None) if not found. Consider path normalization.

4. Implement and test with edge cases

Write clean code with type hints and docstrings. Test with empty paths, duplicate adds, missing lookups, and paths with special characters.

5. Discuss scalability and extensions

Mention how the design could evolve to support wildcards, parameters, or prefix matching, and the trade-offs involved.

Key Points to Mention

  • Hash map provides O(1) average-time complexity for add and lookup.
  • Path normalization (e.g., trailing slashes, case sensitivity) should be defined upfront.
  • Duplicate path handling: decide whether to overwrite or throw an error.
  • Return value for missing paths: use None or a custom exception.
  • Thread safety considerations if the registry is shared across threads.
  • Extensibility: a trie could support prefix matching or wildcards if needed later.

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

Q2

Extend the route registry to support wildcard segments in paths, where a single asterisk matches any one path segment, and define how precedence between exact and wildcard matches should work.

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

This is where I actually had to think.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the requirements: wildcard '*' matches exactly one segment, not multiple. Then propose a data structure like a trie where each node represents a segment, with special handling for wildcard nodes. Define precedence rules: exact matches take priority over wildcard matches, and if multiple wildcards match, the most specific (e.g., leftmost exact) wins.

Pro tip: Mention that wildcard matching should be deterministic and that you would document the precedence rules clearly to avoid ambiguity, which is crucial for API routing at scale.

1. Clarify requirements

Confirm that '*' matches exactly one segment and discuss edge cases like trailing slashes, empty segments, and multiple wildcards.

2. Choose data structure

Propose a trie (prefix tree) where each node represents a path segment, with a special child for wildcard. Alternatively, a list of route patterns with a matching algorithm.

3. Define matching algorithm

Traverse the trie segment by segment; at each step, try exact match first, then wildcard. If both fail, no match.

4. Establish precedence rules

Exact matches always beat wildcard matches. If multiple wildcard routes match, prefer the one with more exact segments earlier in the path (leftmost specificity).

5. Discuss trade-offs and extensions

Mention performance (O(n) per lookup), memory, and how to extend to support '**' for multi-segment wildcards if needed.

Key Points to Mention

  • Wildcard '*' matches exactly one segment, not zero or multiple.
  • Trie data structure allows efficient lookup and easy wildcard handling.
  • Precedence: exact match > wildcard match; among wildcards, leftmost exact segment wins.
  • Deterministic matching is essential for predictable API behavior.
  • Consider edge cases: trailing slashes, empty segments, multiple wildcards.
  • Trade-offs: trie uses more memory but faster; list is simpler but slower for many routes.

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