Two Heaps

Find Right Interval

Given a list of intervals intervals, where intervals = , for each interval i, find the index of the interval j such that start_j is the smallest possible value that…

IPO Problem

You are given k projects, each with a capital value and a profit value. You are also given an initial capital. The i-th project requires capital capital to start, and…

Sliding Window Median

Given an array of integers nums and an integer k, you need to find the median of each window of size k moving from left to right in the array.…