Pattern
Intervals
A compact view of archive entries grouped by recurring technique.
15 entries
15 entries tagged as Intervals.
07.12.2025
easy1523. Count Odd Numbers in an Interval Range
Odds l..h
20.11.2025
hard757. Set Intersection Size At Least Two
Min set each interval have two values in it
8.07.2025
hard1751. Maximum Number of Events That Can Be Attended II
Max top k valued intervals search
17.11.2024
hard862. Shortest Subarray with Sum at Least K
Min subarray with sum at least k queue
11.10.2024
medium1942. The Number of the Smallest Unoccupied Chair
target's chair number when chairs reused by multiple [arrival, leave] times
26.09.2024
medium729. My Calendar I
Insert non-intersection interval search
17.03.2024
medium57. Insert Interval
Insert interval into a sorted intervals array
21.02.2024
medium201. Bitwise AND of Numbers Range
Bitwise AND for [left..right].
29.12.2023
hard1335. Minimum Difficulty of a Job Schedule
Min sum of maximums jobDifficulty[i] per day d preserving the order
9.07.2023
hard2551. Put Marbles in Bags
abs(max - min), where max and min are the sum of k interval borders
12.06.2023
easy228. Summary Ranges
Fold continues ranges in a sorted array 1 2 3 5 -> 1->3, 5
27.04.2023
medium319. Bulb Switcher
Use found law and write the code.
04.03.2023
hard2444. Count Subarrays With Fixed Bounds
For the explicit solution, we take each interval, store positions of the min and max in a TreeSet, then we must take poll those mins and maxes and consider each range separately
13.02.2023
easy1523. Count Odd Numbers in an Interval Range
fun countOdds(low: Int, high: Int): Int {
16.01.2023
medium57. Insert Interval
fun insert(intervals: Array