FastPrepSmallest Most-Lit Street Position
Problems/Smallest Most-Lit Street Position

Smallest Most-Lit Street Position

Hudson River Trading logoHudson River Trading● MediumNEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Hudson River Trading new grad online assessment. The report keeps the streetlight coverage and the rule that ties go to the smallest position. We chose the simplest fixed setup: inclusive integer intervals, and paired arrays for centers and radii. Our version is about 90% the same as the reported question.

A streetlight centered at positions[i] with radius radii[i] illuminates every integer position from positions[i] - radii[i] through positions[i] + radii[i], inclusive.

Return the smallest integer position illuminated by the maximum number of streetlights.

Function

mostLitPosition(positions: int[], radii: int[]) → int

Examples

Example 1

positions = [0,5]radii = [2,3]return = 2

The two inclusive intervals overlap only at position 2.

Example 2

positions = [1,4,7]radii = [3,0,3]return = 4

All three streetlights illuminate position 4.

Example 3

positions = [0,10]radii = [1,1]return = -1

The maximum coverage is one in two disjoint intervals, so the smallest covered position is -1.

Constraints

  • 1 <= positions.length = radii.length <= 200000.
  • -10^8 <= positions[i] <= 10^8.
  • 0 <= radii[i] <= 10^8.

More Hudson River Trading Online Assessment questions

  • Count Palindrome Addition ChoicesOA · Seen Nov 2026
  • Count Multiples of Three with Two SevensOA · Seen Oct 2026
  • Recursively Expanded Shell Command CountsOA · Seen Oct 2026
  • Rotate Matrix Regions Around the DiagonalsOA · Seen Oct 2026
  • Maximum Diamond SumOA · Seen Oct 2026
  • Rearrange String by Alternating EndsOA · Seen Sep 2026
  • Most Items Within Budget from a Start IndexOA · Seen Sep 2026
  • Count Fancy NumbersOA · Seen Sep 2026
  • Count Sawtooth SubarraysOA · Seen Aug 2026
  • Backtick Identifier ConverterOA · Seen Jun 2026

Similar questions at other companies

  • Earliest Time to Schedule a MeetingMathWorks · OAMathWorks interview questions
  • Earliest Meeting Start on a 24-Hour ClockIMC Trading · OAIMC Trading interview questions
  • Earliest Time to Schedule a MeetingMicrosoft · OAMicrosoft interview questions
  • Earliest Common Meeting StartVisa · OAVisa interview questions
  • Most Visited Sprint MarkerChubb · OAChubb interview questions
  • Earliest Common Meeting TimeZipRecruiter · OAZipRecruiter interview questions
  • File Download Coverage PercentagePersona · OAPersona interview questions
  • Peak Chat Load Across AgentsCresta · PHONE SCREENCresta interview questions
  • Majority Labels over Audio IntervalsNooks · PHONE SCREEN
  • Zero Array Transformation IGoogle · ONSITE INTERVIEWGoogle interview questions

Interview reports that mention this question

  • HRT SWE Intern and Onsites: 34 Experiences (Part 2 of 2)
  • HRT Python Track Interviews: 64 Experiences (Part 1 of 2)

Hudson River Trading interview experiences

  • Hudson River Trading Quant Video Interview: 1 Experience
  • HRT New Grad Python Track Interviews: 9 Experiences
All Hudson River Trading interview questionsSee Hudson River Trading hiring insights
Saved
class Solution {
    public int mostLitPosition(int[] positions, int[] radii) {
        // Write your code here.
    }
}
Checking account…