Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Minimum Arrows for Overlapping Intervals

MediumPython00:00
Practice interviewer
In session
5 left
00:00

Your question is Minimum Arrows for Overlapping Intervals. Start with the requirements on the right.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.

Problem

Given an array of intervals points, where each interval is [start, end], return the minimum number of arrows required to cover all intervals. One arrow shot at position x covers every interval such that start <= x <= end.

Constraints

  • 1 <= len(points) <= 10^5
  • points[i].length == 2
  • -2^31 <= start < end <= 2^31 - 1

Function Signature

def find_min_arrows(points):
Your solutionPython 3
You need to log in / sign up to run or submit.
Run your code to see test output