MCPcopy Create free account
hub / github.com/codereport/Content / solve

Function solve

Talks/2019-05-CppNow/AlgorithmIntuition/Slide-034.cpp:3–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1// Solution 3c (C++20 Ranges)
2 
3auto solve() -> int {
4   vector v = { 2, 1, 3, 5, 4 };
5   auto a = *min_element(v);
6   auto b = *max_element(v);
7   return b - a;
8}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected