My Blog List

[Leetcode Solution] Merge Intervals

Analysis 

  • Sort the intervals by the start value
  • Insert intervals while maintain by merge

Note

  • Never use equal or equal less in the comparison function for sort. Details look here

Code


No comments:

Post a Comment

Enter you comment