shlogg · Early preview
Md Ariful Haque @mah-shamim

Divide Intervals Into Minimum Number Of Groups

Divide intervals into min groups: Sort events by time, track ongoing intervals & max overlap, return max count of overlapping intervals at any point.

2406. Divide Intervals Into Minimum Number of Groups
Difficulty: Medium
Topics: Array, Two Pointers, Greedy, Sorting, Heap (Priority Queue), Prefix Sum
You are given a 2D integer array intervals where intervals[i] = [lefti, righti] represents the inclusive interval [lefti, righti].
You have to divide the intervals into one or more groups such that each interval is in exactly one group, and no two intervals that are in the same group intersect each other.
Return the minimum number of groups you need to make.
Two intervals intersect if there is at least one common number between them. For exampl...