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.2K
active users

Šimon Tóth

Sunday common C++ interview problem: Bounded subarrays

Given an array of integers and two boundary values, A and B, return the number of (contiguous) subarrays for which the value A is the minimum and value B is the maximum of the subarray.

Solve it yourself: compiler-explorer.com/z/6d84jE
Solution: compiler-explorer.com/z/6EraMz