FastPrepBuildable Robots from Available Part Types
Problems/Buildable Robots from Available Part Types

Buildable Robots from Available Part Types

Atlassian logoAtlassian● EasyFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The robot-part objective and listed requirements match the source at about 95%. Its Rosie output conflicts with the missing claw; this exercise applies the stated all-parts rule.

Given requirements and available, return the names of all robots that can be built, in lexicographic order.

Each string in requirements has the form Robot_Part and means that robot needs that part type. available lists the part types you have. A robot can be built only if every part type it needs is in available, so a single missing type such as claw blocks it. Only robots named in requirements count.

Part types are reusable, not counted. Duplicate entries in either list do not change the answer, and building one robot does not use up parts another robot needs. If requirements is empty, return an empty list.

Function

buildableRobots(requirements: String[], available: String[]) → String[]

Examples

Example 1

requirements = ["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 = ["sensors","case","speaker","wheels"]return = ["Optimus"]

Optimus has every required part. Rosie lacks claw, Dustie lacks arms, and Rust lacks claw and legs.

Example 2

requirements = ["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 = ["sensors","case","speaker","wheels","claw"]return = ["Optimus","Rosie"]

Adding claw makes Rosie buildable; the other missing parts still block Dustie and Rust.

Example 3

requirements = ["A_case","B_case","A_case"]available = ["case"]return = ["A","B"]

Both robots need only case. Repeated requirements do not consume extra parts.

Constraints

  • 0 <= requirements.length, available.length <= 500.
  • Each requirement has exactly one underscore separating a nonempty robot name from a nonempty part name.
  • Names have 1 through 30 ASCII letters or digits, contain no underscores, and are case-sensitive.

More Atlassian Phone Screen questions

  • Merge Overlapping IntervalsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Tennis Court SchedulingPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Implement a Rate LimiterPHONE SCREEN · Seen Oct 2026
  • Longest Consistent Activity StreakPHONE SCREEN · Seen Sep 2026
  • Music Player Operation SequencePHONE SCREEN · Seen Sep 2026
  • Underline Shortest Unique SubstringsPHONE SCREEN · Seen Aug 2026
  • Can a Dictionary Word Be Formed from Note Letters?PHONE SCREEN · Seen Feb 2026
  • Word Path Moving Only Right or DownPHONE SCREEN · Seen Feb 2026
  • Ordered Badge Entry and Exit ViolationsPHONE SCREEN · Seen Aug 2025
  • Two Sum with an Ordered Index PairPHONE SCREEN · Seen Aug 2025

Similar questions at other companies

  • Detect a Straight FlushTemu · PHONE SCREENTemu interview questions
  • Shared Courses for Every Pair of StudentsCrunchyroll · PHONE SCREENCrunchyroll interview questions
  • Single-Condition Product FilterCrowdstrike · PHONE SCREENCrowdstrike interview questions
  • Convert an Entry List to a MapEPAM · PHONE SCREENEPAM interview questions
  • Most Frequent NameAmazon · PHONE SCREEN
  • Words with Repeated AnagramsThe Voleon Group · PHONE SCREEN
  • Project JSON Fields into a Target FormatBooking.com · PHONE SCREEN
  • Product Keyword SearchTesco · PHONE SCREEN
  • Verify Words Sorted by a Custom AlphabetTrueFoundry · PHONE SCREEN
  • Character Frequencies Across Nested String ListsSnowflake · PHONE SCREENSnowflake interview questions

Atlassian interview experiences

  • Atlassian MLE Phone Screen: Model Deployment Design: 1 Experience
  • Atlassian Coding Screens and Karat: 3 Experiences (Part 2 of 2)
  • Atlassian Full Stack Interviews: 11 Experiences (Part 1 of 2)
All Atlassian interview questionsSee Atlassian hiring insights
Saved
class Solution {
    public String[] buildableRobots(String[] requirements, String[] available) {
        // Write your code here.
        return new String[0];
    }
}
Checking account…