Razorpay Interview Question

Give code for overlapping intervals.