This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Log from "@dazn/lambda-powertools-logger" | |
| import { | |
| LambdaClient, | |
| ListFunctionsCommand, | |
| ListFunctionsCommandOutput, | |
| ListTagsCommand, | |
| } from "@aws-sdk/client-lambda" | |
| const lambda = new LambdaClient({}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// Takes a vector of closed intervals of the form [start, end], merges any invervals in which one interval | |
| /// overlaps with another (i.e. at least one of the endpoints of one interval is contained within a second | |
| /// interval), and returns a list of the merged intervals. | |
| fn main() { | |
| // sort ranges numerically | |
| // Define a vector of ranges | |
| let ranges = vec![[15, 18], [2, 6], [8, 10], [1, 3]]; | |
| // let ranges = vec![[1, 5], [2, 3], [4, 8], [9, 10], [9, 12]]; |
OlderNewer