Fix a bug when adding digit for a rearrangement.
Add one more test case to cover one edge case when merging intervals.
Implement marking of overlapped intervals conflict.