Bank Operating-Hours Coverage
Problem statement
You are given bank operating intervals operatingHours[i] = [open, close] and one transaction interval [start, end]. Each time is a 24-hour HH:MM string.
Different banks may collectively cover one transaction: overlapping or touching operating intervals form continuous coverage. Return whether the entire transaction interval lies inside one merged coverage interval.
Function
isTransactionCovered(operatingHours: String[][], transaction: String[]) → booleanExamples
Example 1
operatingHours = [["04:20","12:30"],["19:00","21:45"],["14:00","17:30"],["12:30","14:00"]]transaction = ["11:00","17:30"]return = trueThe first, fourth, and third intervals touch and merge into coverage from 04:20 through 17:30.
Example 2
operatingHours = [["09:00","12:00"],["13:00","17:00"]]transaction = ["11:30","13:30"]return = falseThe uncovered hour between noon and 13:00 interrupts the transaction.
Constraints
1 <= operatingHours.length <= 10^5.- Every time is a valid same-day 24-hour time and each interval has start no later than end.
- All times use the same timezone.