Atlassian logo

Atlassian Software Engineer System Design Questions

27 practice questions for Atlassian Software Engineer 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

No verified questions yet for Atlassian.

system design Hard heap #1

1. 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.
Want to practise this one?
Create a free account to open the full question and practise Atlassian questions with AI.
Sign up free

Related Atlassian Software Engineer interview prep

Start practicing Atlassian questions

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

Get Started Free