MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / overlaps

Function overlaps

non_overlapping_intervals_435/solution.go:74–82  ·  view source on GitHub ↗
(intervals [][]int)

Source from the content-addressed store, hash-verified

72}
73
74func overlaps(intervals [][]int) bool {
75 for j := 1; j < len(intervals); j++ {
76 if intervals[j-1][1] > intervals[j][0] {
77 return true
78 }
79 }
80
81 return false
82}
83
84// Initial solution, which failed to recognize that the removal
85// order isn't necessarily a part of the start sorted sequence.

Callers 1

eraseOverlapHelperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected