3 ms·
It is pretty easy, I would expect that at least some people would be able to do it. MIN_INTEGER was an example, it should be obvious you want the minimum for w
by CyberDildonics 6y ago
It is pretty easy, I would expect that at least some people would be able to do it. MIN_INTEGER was an example, it should be obvious you want the minimum for whatever type you are using. Standard C++ has std::numeric_limits<T>::lowest
- lixtra 6y agoStandard C++ also has std::max_element [1] (and accidentally the possible implementation looks surprisingly familiar). Not that I know much of C++. [1] https://en.cppreference.com/w/cpp/algorithm/max_element https://en.cppreference.com/w/cpp/algorithm/max_element
- CyberDildonics 6y agoThat returns an iterator the max element, not the value. I'm not sure which part makes this so difficult that everyone fails on the first try.