Check out example codes for "min in vector c++". It will help you in understanding the concepts better.

Code Example 1

*min_element(a.begin(), a.end());

Code Example 2

template <typename T, size_t N> const T* mybegin(const T (&a)[N]) { return a; }    
template <typename T, size_t N> const T* myend  (const T (&a)[N]) { return a+N; }

Learn ReactJs, React Native from akashmittal.com