Atlassian logo

Atlassian Hard Interview Questions

3 hard-level practice questions for Atlassian technical interviews

Atlassian software engineer interviews cover algorithms, data structures, system design, and coding problems drawn from real interview rounds.

Software Engineer Backend Engineer Frontend Engineer Full Stack Engineer Mobile Engineer Data Engineer Data Scientist ML Engineer DevOps Engineer DevOps Engineer Product Manager SRE Security Engineer Engineering Manager Data Analyst UX/UI Designer QA Engineer
coding Hard Verified Question #1

1. Tennis Court Bookings


Category: Algorithm coding problem

Question The input is a list of tennis court bookings, where each booking includes a start and end time. You need to write a program that assigns...

Input: List
Output: Integer
Want to practise this one?
Create a free account to open the full question and practise Atlassian questions with AI.
Sign up free
coding Hard linked list #1

1. [Hash Map and Linked List] — Track the most popular Confluence page with recency-based ties


Background
Confluence surfaces popular pages to help teams discover useful documentation. Atlassian interview reports describe a content-popularity tracker with increment, decrement, and maximum queries, followed by recency-based tie handling; this problem adapts that reported pattern to page IDs.
Problem statement
Implement PopularityTracker, an in-memory tracker of positive integer popularity scores for Confluence pages. Initially, no pages are tracked.
Calling increasePopularity(pageId) increases the page's score by one, creating it with score one if necessary. Calling decreasePopularity(pageId) decreases an existing page's score by one; a page whose score reaches zero is removed. Decreasing an untracked page is a no-op.
Calling mostPopular() returns the ID of the tracked page with the highest score, or null if none exists. If several pages have the highest score, return the page whose most recent score-changing operation occurred latest. Both increases and decreases count as score-changing operations, including operations that move a page into a tie. Calls execute sequentially, so operation order defines recency without timestamps. Queries and no-op decreases do not change recency. A removed page can later be created again.
All three operations must run in expected O(1) time, using O(n) space, where n is the number of currently tracked pages. Do not retain historical records for removed pages or empty score groups.
Function or class signature
  • PopularityTracker() — construct an empty tracker.

  • increasePopularity(pageId: str) -> None

  • decreasePopularity(pageId: str) -> None

  • mostPopular() -> str | None


Example 1:
Input:
{
  "operations": [
    ["increasePopularity", "ENG-101"],
    ["increasePopularity", "ENG-202"],
    ["mostPopular"],
    ["increasePopularity", "ENG-101"],
    ["mostPopular"],
    ["increasePopularity", "ENG-202"],
    ["mostPopular"],
    ["decreasePopularity", "ENG-202"],
    ["mostPopular"]
  ]
}
Output, containing results only for mostPopular calls:
["ENG-202", "ENG-101", "ENG-202", "ENG-101"]
Explanation: The first query sees both scores at one, and ENG-202 was updated later. Next, ENG-101 alone has score two. Increasing ENG-202 creates a tie at two that it wins by recency. Decreasing it to one leaves ENG-101 as the unique maximum.
Example 2:
Input:
{
  "operations": [
    ["mostPopular"],
    ["decreasePopularity", "UNKNOWN"],
    ["increasePopularity", "RUNBOOK"],
    ["increasePopularity", "RUNBOOK"],
    ["increasePopularity", "HANDBOOK"],
    ["decreasePopularity", "RUNBOOK"],
    ["mostPopular"],
    ["decreasePopularity", "RUNBOOK"],
    ["mostPopular"],
    ["decreasePopularity", "HANDBOOK"],
    ["mostPopular"],
    ["increasePopularity", "RUNBOOK"],
    ["mostPopular"]
  ]
}
Output:
[null, "RUNBOOK", "HANDBOOK", null, "RUNBOOK"]
Explanation: The tracker starts empty, and decreasing UNKNOWN changes nothing. Decreasing RUNBOOK from two to one makes it the most recently updated page in the tie with HANDBOOK. Removing RUNBOOK leaves HANDBOOK; removing HANDBOOK empties the tracker. Creating RUNBOOK again gives it score one.
Constraints:
  • At most 200000 method calls are made.

  • pageId is a case-sensitive string of 1 to 64 ASCII letters, digits, hyphens, or underscores.

  • Scores are integers between 1 and 200000 for tracked pages.

  • Calls are single-threaded and arrive in their execution order.

  • Expected O(1) time assumes constant-time hashing of these bounded-length IDs.


Follow-up: Extend the API with topK(k: int) -> list[str], ordered by descending score and then descending update recency. Can you return the result in O(min(k, n)) time without changing the expected O(1) update bounds?
Want to practise this one?
Create a free account to open the full question and practise Atlassian questions with AI.
Sign up free
system design Hard heap #2

2. Design ConfluencePopularityTracker — rank pages and recommend unseen content


Background
Atlassian Confluence helps teams discover useful knowledge across a workspace. Implement an in-memory component that maintains changing page-popularity scores and recommends popular pages that a particular user has not viewed. This exercise adapts candidate-reported Atlassian popularity-tracker and unseen-page recommendation questions; the exact API and rules below are specified for this exercise.
Requirements
1. Each page has a nonnegative integer popularity score, initially zero. Increasing popularity adds one; decreasing subtracts one. Arbitrary signed adjustments are also supported, with the resulting score clamped to zero. Only pages with positive scores participate in rankings.
2. Rank pages by descending popularity, breaking ties by lexicographically ascending page ID. Page IDs contain only lowercase ASCII letters and digits.
3. Return the globally most popular page, or null when no page has a positive score. Updates must take O(log n) time and this lookup must take O(1), where n is the number of positively scored pages.
4. Record which pages each user has viewed. Recording a view is idempotent and does not change popularity. Views may be recorded before a page becomes popular, and remain recorded even if that page later reaches zero popularity.
5. Return up to k ranked pages that the requesting user has not viewed. This operation must not change scores, ranking state, or viewing history. Avoid sorting all active pages on every request; traversal may still inspect every active page when exclusions require it.
6. Public methods must be thread-safe and linearizable within one process. Persistence, distributed coordination, page permissions, and time-based score decay are outside scope.
Class API
  • ConfluencePopularityTracker() — create an empty tracker.

  • increasePopularity(pageId: str) -> int — add one and return the resulting score.

  • decreasePopularity(pageId: str) -> int — subtract one, clamp at zero, and return the resulting score.

  • adjustPopularity(pageId: str, delta: int) -> int — apply a signed adjustment and return the resulting score; adjusting an unknown page by zero or a negative amount leaves it inactive.

  • getMostPopular() -> str | None — return the highest-ranked active page, or null.

  • markViewed(userId: str, pageId: str) -> None — record that the user has viewed the page.

  • getRecommendations(userId: str, k: int) -> list[str] — return at most k unseen page IDs in ranking order; an unknown user has no viewed pages, and k = 0 returns an empty list.


Example 1:
Input sequence, on a new tracker:
[
  ["adjustPopularity", "architecture", 5],
  ["adjustPopularity", "runbook", 5],
  ["increasePopularity", "onboarding"],
  ["getMostPopular"],
  ["markViewed", "alice", "architecture"],
  ["getRecommendations", "alice", 2],
  ["decreasePopularity", "architecture"],
  ["getMostPopular"]
]

Output, one result per call:
[5, 5, 1, "architecture", null, ["runbook", "onboarding"], 4, "runbook"]

Explanation: Architecture and runbook initially tie at 5, so architecture wins lexicographically. Alice's recommendations exclude architecture. Decreasing architecture to 4 makes runbook the global leader.
Example 2:
Input sequence, on a new tracker:
[
  ["markViewed", "bob", "runbook"],
  ["adjustPopularity", "runbook", 3],
  ["adjustPopularity", "runbook", -10],
  ["getMostPopular"],
  ["increasePopularity", "runbook"],
  ["increasePopularity", "architecture"],
  ["getRecommendations", "bob", 5],
  ["getRecommendations", "carol", 5],
  ["getRecommendations", "bob", 0]
]

Output:
[null, 3, 0, null, 1, 1, ["architecture"], ["architecture", "runbook"], []]

Explanation: Subtracting 10 from 3 clamps runbook to zero and removes it from rankings. Its later reactivation does not erase Bob's viewing history. Both active pages then have score 1, so architecture ranks first.
Constraints
  • At most 100,000 public method calls, 100,000 distinct page IDs, and 100,000 distinct user IDs per tracker.

  • IDs are nonempty strings of at most 64 lowercase ASCII letters or digits; inputs satisfy these bounds.

  • Each delta is an integer in [-10^9, 10^9]; 0 ≤ k ≤ 100.

  • At most 100,000 distinct user-page view pairs are stored. View history is retained for the lifetime of the tracker.

  • Concurrent callers may invoke any public methods; each recommendation must reflect one consistent snapshot.

Start practicing Atlassian questions

Sign up for free to access walkthroughs, AI-generated questions, and more.

Get Started Free