FastPrepMaximum Satisfied Customers
Problems/Maximum Satisfied Customers

Maximum Satisfied Customers

Atlassian logoAtlassian● MediumFULLTIMEOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Atlassian full-time online assessment. The report leaves out the function interface and the numeric limits. We chose those. Our version is about 96% the same as the reported question.

Each customer lists every item they need, and each shop lists the items it stocks. You may open at most two shops.

A customer is satisfied when every required item is stocked by at least one open shop. Return the maximum number of customers that can be satisfied simultaneously.

Function

maxSatisfiedCustomers(customers: int[][], shops: int[][]) → int

Examples

Example 1

customers = [[1,2],[1,5]]shops = [[1,3,4,5],[2,4,6,8],[1,3,4,6]]return = 2

Opening the first and second shops makes items 1, 2, and 5 available, satisfying both customers.

Constraints

  • 1 <= customers.length <= 200
  • 1 <= shops.length <= 60
  • 1 <= customers[i].length, shops[j].length <= 20
  • 1 <= item <= 10^9
  • Repeated item identifiers in one list have the same meaning as one occurrence.

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

  • Stacked Item and Category DiscountsPalantir · OAPalantir interview questions
  • Process Banking OperationsVercel · OA
  • First Completed Mingo LineEpic · OAEpic interview questions
  • Count House Segments After Sequential DestructionByteDance · OAByteDance interview questions
  • HTTP Request RedirectionAmazon · OA
  • Hungarian Lottery Winner CountsAlpaca · OA
  • Cheating CodemakerJane Street · OAJane Street interview questions
  • Aggregate Paginated Project Run RecordsReplit · OA
  • Occupy and Clean Memory by Allocation IDZipRecruiter · OAZipRecruiter interview questions
  • Capital Gains Tax from TradesArcesium · OAArcesium 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 maxSatisfiedCustomers(int[][] customers, int[][] shops) {
      // Write your code here.
    }

}
Checking account…