Minimum Days to Watch All Movies
Updated
Problem statement
Watch every movie in durations. Each day you may watch at most 3.00 units of movie time. A movie must be watched completely on one day, and you may choose the movie order.
Return the minimum number of days needed.
Function
findMinimumDays(durations: double[]) → intExamples
Example 1
durations = [1.9,1.04,1.25,2.5,1.75]return = 3Use one day for 1.90+1.04=2.94, one for 2.50, and one for 1.25+1.75=3.00. At most two movies fit in a day, so five movies need at least three days.
Example 2
durations = [1.5,1.5,3.0]return = 2The two 1.50 movies share a day, and the 3.00 movie uses another day.
Constraints
- For this exercise, assume 1 <= durations.length <= 100000.
- 1.01 <= durations[i] <= 3.00.
- Each duration has at most two decimal places.
Source note: Original OA task images and any included source example. The practice contract follows the rules stated in the problem and source note.
More Adobe Online Assessment questions
- Rotate an Array In PlaceOA · PHONE SCREEN · Seen Aug 2026
- Top-Funded Villages and ProjectsOA · Seen Aug 2026
- Count Parent Nodes With a Target SumOA · Seen Aug 2026
- Largest Binary Number by ConcatenationOA · Seen Aug 2026
- Count Events by CategoryOA · Seen Aug 2026
- Graph M-ColoringOA · Seen Aug 2026
- Hall of Shifting TilesOA · Seen Aug 2026
- K-th Ancestor Subtree Preorder QueryOA · Seen Aug 2026
- Maze ReachabilityOA · Seen Aug 2026
- Minimum Numeric Code TransformationOA · Seen Aug 2026
Similar questions at other companies
- Maximum Easy Tasks After RearrangingIBM · OAIBM interview questions
- Latest Arrival to Catch a BusAutodesk · OAAutodesk interview questions
- Minimum Removals to Balance ArraySalesforce · OASalesforce interview questions
- Minimum Machines for TasksExpedia · OAExpedia interview questions
- Find Minimum Possible SizeMathWorks · OAMathWorks interview questions
- Efficient Janitor TripsRoblox · OARoblox interview questions
- Catch Fish with Reusable BaitsSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
- Can Every Package Fit in a BoxIMC Trading · OAIMC Trading interview questions
- Minimum Tunnel Crossing TimeArcesium · OAArcesium interview questions
- Get Maximum PairsAmazon · OA
Adobe interview experiences
- Adobe Web, QA, DevOps, ML Roles: 13 Experiences (Part 3 of 3)
- Adobe SWE Interviews, Level Unknown: 25 Experiences (Part 2 of 3)
- Adobe Interviews, Level Unknown: 38 Experiences (Part 1 of 3)
- Adobe New Grad MTS Interview Questions: 7 Experiences
- Adobe ML/Research Intern Interviews: 12 Experiences (Part 4 of 4)
- Adobe Product Intern Interviews: 15 Experiences (Part 3 of 4)