SigTuple interview question

HackerEarth questions were related to Sweep Line algorithm and Maximum sum rectangle