hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.5K
active users

Šimon Tóth

Given a list of schedules, where each schedule is a sorted sequence of non-overlapping intervals, return the list of finite intervals that are not covered by any of the intervals.

The intervals are half-open: {10, 15} covers 10 but not 15.

As an additional (C++ specific) challenge, avoid unnecessary copies of the input data.

Solve it yourself: compiler-explorer.com/z/3zj4M4
Solution: compiler-explorer.com/z/E8ra7b

@simontoth i was solving this problem in CTRE to check for first-follow conflict and if there is none, I can modify greedy cycle into possessive.

@hanadusikova Interesting; I would not expect this in particular to pop up in regular expressions.