LC435
LC.435无重叠区间
这题第二次写了,有思路但还是写反了,特此记录提醒。
type in [][]int
func (p in) Len() int {
return len(p)
}
func (p in) Swap(i, j int) {
p[i], p[j] = p[j], p[i]
}
func (p in) Less(i, j int) bool {
return p[i][1] < p[j][1]
}
func eraseOverlapIntervals(intervals
原创
2021-04-01 00:18:22 ·
80 阅读 ·
0 评论