Amazon Interview Question

1) Merge Intervals 2) Occurrence of first unique character in a string