atlassian logo
Atlassian· SDE-2

Atlassian SDE-2 Karat Round

Posted
20 Apr 2025
502 reads

Summary

I participated in a Karat round for an SDE-2 position at Atlassian, which included two distinct algorithmic challenges involving robot construction and delivery cart path analysis.

How it went

Question 1

Input Structure:

We have two inputs: a list of available parts and a list of required parts for each robot. Each robot's required parts are stored in a dictionary where the key is the robot name and the value is a list of parts needed. Output:

We need to return a list of robot names that can be fully constructed with the available parts.

List = [ "Rosie_claw", "Rosie_sensors", "Dustie_case", "Optimus_sensors", "Rust_sensors", "Rosie_case", "Rust_case", "Optimus_speaker", "Rosie_wheels", "Dustie_case", "Dustie_arms", "Rust_claw", "Dustie_case", "Dustie_speaker", "Optimus_case", "Optimus_wheels", "Optimus_wheels", "Rust_legs", "Optimus_sensors" ] Available Parts = {"sensors", "case", "speaker", "wheels"}

output - [Optimus, Rosie]

Question 2

You work in an automated robot factory. Once robots are assembled, they are sent to the shipping center via a series of autonomous delivery carts, each of which moves packages on a one-way route.

Given input that provides the (directed) steps that each cart takes as pairs, write a function that identifies all the start locations, and a collection of all of the possible ending locations for each start location.

In this diagram, starting locations are at the top and destinations are at the bottom - i.e. the graph is directed exclusively downward.


   A          E      J       Key:  [Origins]
  / \        / \      \                 \
 B   C      F   L      M             [Destinations]
  \ /  \   /
   K     G
        / \
       H   I

paths = [ ["B", "K"], ["C", "K"], ["E", "L"], ["F", "G"], ["J", "M"], ["E", "F"], ["C", "G"], ["A", "B"], ["A", "C"], ["G", "H"], ["G", "I"] ]

Expected output (unordered):
[ "A": ["K", "H", "I"], "E": ["H", "L", "I"], "J": ["M"] ]

N: Number of pairs in the input.

Questions asked (2)

  1. 01

    Construct Robots from Available Parts

    Data Structures & Algorithms

    Input Structure:

    We have two inputs: a list of available parts and a list of required parts for each robot. Each robot's required parts are stored in a dictionary where the key is the robot name and the value is a list of parts needed. Output:

    We need to return a list of robot names that can be fully constructed with the available parts.

    List = [ "Rosie_claw", "Rosie_sensors", "Dustie_case", "Optimus_sensors", "Rust_sensors", "Rosie_case", "Rust_case", "Optimus_speaker", "Rosie_wheels", "Dustie_case", "Dustie_arms", "Rust_claw", "Dustie_case", "Dustie_speaker", "Optimus_case", "Optimus_wheels", "Optimus_wheels", "Rust_legs", "Optimus_sensors" ] Available Parts = {"sensors", "case", "speaker", "wheels"}

    output - [Optimus, Rosie]

  2. 02

    Robot Delivery Cart Paths (Find Start/End Locations)

    Data Structures & Algorithms

    You work in an automated robot factory. Once robots are assembled, they are sent to the shipping center via a series of autonomous delivery carts, each of which moves packages on a one-way route.

    Given input that provides the (directed) steps that each cart takes as pairs, write a function that identifies all the start locations, and a collection of all of the possible ending locations for each start location.

    In this diagram, starting locations are at the top and destinations are at the bottom - i.e. the graph is directed exclusively downward.

    
       A          E      J       Key:  [Origins]
      / \        / \      \                 \
     B   C      F   L      M             [Destinations]
      \ /  \   /
       K     G
            / \
           H   I
    

    paths = [ ["B", "K"], ["C", "K"], ["E", "L"], ["F", "G"], ["J", "M"], ["E", "F"], ["C", "G"], ["A", "B"], ["A", "C"], ["G", "H"], ["G", "I"] ]

    Expected output (unordered):
    [ "A": ["K", "H", "I"], "E": ["H", "L", "I"], "J": ["M"] ]

    N: Number of pairs in the input.

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!