atlassian logo
Atlassian· SDE 2

Atlassian SDE 2

Result
No Offer
Location
India
Experience
3 years
Posted
6 Apr 2026
925 reads

Summary

I was presented with a challenging problem to design a class for tracking content popularity from a continuous stream of actions and retrieving the most popular content ID efficiently.

How it went

During my interview round, I was given a data structures and algorithms problem. The interviewer asked me to implement a class that could manage content popularity based on a stream of incoming actions. The key was to efficiently handle both increasing and decreasing popularity for specific content IDs, and then, at any point, be able to return the ID of the most popular content. This required careful consideration of data structures to ensure real-time performance for all operations.

Questions asked (1)

  1. 01

    Most Popular Content ID from Stream

    Data Structures & Algorithms · Medium

    Imagine you are given a stream of content IDs along with an associated action to be performed on them.
    Examples of contents are video, pages, posts etc.
    There can be two actions associated with a content ID:

    • increasePopularity: increases the popularity of the content by 1. The popularity increases when someone comments on the content or likes the content.
    • decreasePopularity: decreases the popularity of the content by 1. The popularity decreases when a spam bot’s/user's comments are deleted from the content or its likes are removed from the content.
    Content IDs are positive integers.
    Implement a class that can return the mostPopular content ID at any time while consuming the stream of content IDs and its associated action. If there are no content IDs with popularity greater than 0, return -1.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Atlassian recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!