Intervals - Data Stream as Disjoint Intervals
In the following pseudocode for adding a number to intervals, which step is likely to cause incorrect merging when the number is already inside an existing interval?
1. Find position to insert number
2. Check if number is adjacent to previous interval
3. Check if number is adjacent to next interval
4. Insert number as new interval if no adjacency found
