Should be a hard problem. Core Idea : Fix one number, reduce the problem size, repeat until only two numbers are left, then solve that directly v.end() : A member function Exists only if v is a container class end(v) : A free function (std::end) which internally calls v.end(), safer, modern and generic Main difference: ``` int arr[] = {1,2,3}; auto a = end(arr); // works auto b = arr.end(); // ERROR ```