You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Test against the edge case when the vector is empty. Could be useful when std::max_element() is used form algorithm header and dereferencing its result could cause segmentation fault.
If iterative solution is used, when nothing is found then std::numeric_limits::min() may be returned if defined.
Similarly if max is initialized with the first element of a vector - SegFault.
The text was updated successfully, but these errors were encountered:
Test against the edge case when the vector is empty. Could be useful when std::max_element() is used form algorithm header and dereferencing its result could cause segmentation fault.
If iterative solution is used, when nothing is found then std::numeric_limits::min() may be returned if defined.
Similarly if max is initialized with the first element of a vector - SegFault.
The text was updated successfully, but these errors were encountered: