FastPrepMinimum Team Size From Every Start
Problems/Minimum Team Size From Every Start

Minimum Team Size From Every Start

Atlassian logoAtlassian● MediumFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Atlassian full-time online assessment. The screenshots and the solution that came with them agree on all the rules for forming teams. Our version is about 99% the same as the reported question.

Students stand in a fixed order. talent[i] is an integer from 1 through talentsCount.

For every starting index, choose a consecutive group beginning there that contains every talent at least once. Return the minimum possible group length for each start, or -1 when the remaining suffix cannot form a complete team.

Function

teamSize(talent: int[], talentsCount: int) → int[]

Examples

Example 1

talent = [1,2,3,2,1]talentsCount = 3return = [3,4,3,-1,-1]

The shortest complete windows starting at the first three positions have lengths 3, 4, and 3. The last two suffixes miss at least one talent.

Constraints

  • 1 <= talent.length, talentsCount <= 200000
  • 1 <= talent[i] <= talentsCount

More Atlassian Online Assessment questions

  • Planning ProductionOA · Seen Feb 2025
  • K-Means ClusteringOA · Seen Feb 2025
  • Minimum Sorted Erasure OperationsOA · Seen Jun 2024
  • Count Analogous ArraysOA · Seen Mar 2024
  • Get Maximum ScoreOA · Seen Mar 2024
  • Better Compression 🦀OA · Seen Mar 2024
  • Romanizer 🐡OA · Seen Mar 2024
  • Flower Bouquets 💐OA · Seen Mar 2024
  • Binary Search Tree IteratorOA · Seen Nov 2023
  • Binary Tree Level Order TraversalOA · Seen Nov 2023

Similar questions at other companies

  • API Rate Limit Violation DetectionTekion · OATekion interview questions
  • Count Subarrays With Product Equal to KSalesforce · OASalesforce interview questions
  • Garden Sprinkler PlacementAirbnb · OAAirbnb interview questions
  • Sliding-Window Means with IEEE Special ValuesHeadlands Technologies · OAHeadlands Technologies interview questions
  • Earn the Most 🐝Capital One · OACapital One interview questions
  • Count Belt Sections With K Fruit Pairs (Forward Deployed Engineer)Boston Consulting Group · OABoston Consulting Group interview questions
  • Count Servers With No Requests in a Time WindowIBM · OAIBM interview questions
  • Reschedule Meetings for Maximum Free TimeFivetran · OAFivetran interview questions
  • Count Subarrays with at Least K Equal-Fruit PairsTikTok · OATikTok interview questions
  • Consistent LogsRippling · OARippling 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 int[] teamSize(int[] talent, int talentsCount) {
      // Write your code here.
    }

}
Checking account…