MCPcopy Create free account
hub / github.com/apache/kvrocks-controller / MergeSlotRanges

Function MergeSlotRanges

store/slot.go:250–255  ·  view source on GitHub ↗
(a SlotRange, b SlotRange)

Source from the content-addressed store, hash-verified

248}
249
250func MergeSlotRanges(a SlotRange, b SlotRange) SlotRange {
251 return SlotRange{
252 Start: min(a.Start, b.Start),
253 Stop: max(a.Stop, b.Stop),
254 }
255}
256
257// Implemented following leetcode solution:
258// https://leetcode.com/problems/merge-intervals/solutions/1805268/go-clean-code-with-explanation-and-visual-10ms-100

Callers 1

AddSlotToSlotRangesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected