Razorpay interview question

Give code for overlapping intervals.