FastPrepUniversity Career Fair
Problems/University Career Fair

University Career Fair

Roblox logoRoblox● MediumNEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The candidate names University Career Fair. Separate task-reference screenshots give the fixed schedule of arrivals and durations, the examples, and the limits. They are not this candidate's own images. Our version is about 95% the same as the reported question.

A career fair has one presentation stage. Company i arrives at time arrival[i] and its presentation occupies the fixed interval from that time until arrival[i] + duration[i]. You may accept or reject each presentation; you cannot shift its start time or shorten it.

Return the maximum number of nonoverlapping presentations that can be hosted. A presentation may start exactly when another ends. For this exercise, assume both input arrays must remain unchanged.

Function

maxEvents(arrival: int[], duration: int[]) → int

Examples

Example 1

arrival = [1,3,3,5,7]duration = [2,2,1,2,1]return = 4

Choose the first presentation, either compatible presentation at time 3, then times 5 and 7.

Example 2

arrival = [1,3,5]duration = [2,2,2]return = 3

Each next presentation starts when the previous one ends.

Example 3

arrival = [1,2,3]duration = [10,2,1]return = 1

Every pair overlaps, so only one can be hosted.

Constraints

  • 1 <= arrival.length = duration.length <= 50.
  • 1 <= arrival[i], duration[i] <= 1000.
  • Only one presentation can occupy the stage at a time; touching endpoints are allowed.

More Roblox Online Assessment questions

  • Centered Block Placement QueriesOA · Seen Oct 2026
  • Robot Navigation Around LasersOA · Seen Oct 2026
  • Factory Batch Profit (Game Adaptation)OA · Seen Sep 2026
  • Nested Recipe Blocks (Game Adaptation)OA · Seen Sep 2026
  • Vehicle Builds for Required Terrain (Game Adaptation)OA · Seen Sep 2026
  • Track Received Byte RangesOA · Seen Sep 2026
  • Break a PalindromeOA · Seen Jun 2026
  • Count Pairs Differing in One DigitOA · Seen Oct 2025
  • Find Zero Cells in a 2×2 GridOA · Seen Oct 2025
  • Cat Route Budget Planning (Game Adaptation)OA · Seen Aug 2025

Similar questions at other companies

  • Maximum Compatible Time WindowsIBM · OAIBM interview questions
  • Minimum Markers to Clear Line SegmentsHSBC · OAHSBC interview questions
  • Minimum Machines for TasksExpedia · OAExpedia interview questions
  • Most Disjoint Intervals From Starts and DurationsDocuSign · OADocuSign interview questions
  • Minimum Removals for Non-Overlapping IntervalsByteDance · PHONE SCREEN · ONSITE INTERVIEWByteDance interview questions
  • Maximum Number of Events That Can Be AttendedSnowflake · PHONE SCREENSnowflake interview questions
  • Minimum Workers with Job AssignmentsLyft · ONSITE INTERVIEWLyft interview questions
  • Minimum Appointment Cancellations with a Required BreakMaven Clinic · PHONE SCREENMaven Clinic interview questions
  • Minimum Removals for Non-Overlapping IntervalsBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
  • Minimum Meeting RoomsSentry · PHONE SCREENSentry interview questions

Interview reports that mention this question

  • Roblox New Grad Engineer Rounds: 13 Experiences (Part 6 of 7)
  • Roblox New Grad HackerRank OA: 18 Experiences (Part 5 of 7)

Roblox interview experiences

  • Roblox New Grad Early OA Tasks: 10 Experiences (Part 7 of 7)
  • Roblox New Grad CodeSignal Finals: 23 Experiences (Part 4 of 7)
  • Roblox New Grad Games and BQ: 25 Experiences (Part 3 of 7)
  • Roblox New Grad Coding Rounds: 23 Experiences (Part 2 of 7)
All Roblox interview questionsSee Roblox hiring insights
Saved
class Solution {
    public int maxEvents(int[] arrival, int[] duration) {
        // write your code here
    }

}
Checking account…