Tracks in Hackathon

Problem Overview

  • Determine the minimum number of teams using only sizes teamSize_1 or teamSize_2 so all p participants are assigned; return -1 if no exact division.
  • Input: teamSize_1, teamSize_2, p. Output: int minimum teams. Constraints: 1 ≤ each ≤ 1e5.
  • Context: Hackathon with healthcare and e-commerce tracks.
  • From Jpmorgan interviews; a coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: