Back to problems

Most Visited Marker in Sprint Training

Algorithm · Salesforce · Easy

During a series of sprint drills, an athlete runs from a starting position to an ending position, covering every integer point along the way inclusive. You are given a list of such training intervals, each as a pair [L, R]. For each integer position, compute how many intervals include that position. Return the position that is covered most frequently. If multiple positions share the maximum coverage, return the smallest one. Example 1: Explanation: Positions 3 and 4 are each…

Checking your access…