Finding Second Largest Element in an Array
Inefficient algorithm

As stated in the comments, the algorithm is actually pretty convoluted. One cannot find the maximum without looking at all of the elements, if they don't have any idea about the pattern of the input.

On top of that, it allocates quite a lot of memory.

Non-standard C++

VLA (variable length array) is not part of C++. It might be an extension in your compiler

Using C++ as C

The code is extremely imperative. It has a lot of control that it doesn't use, and doesn't have any benefit over standard algorithms. It is also bound to int arrays, to pointers, in fact. May be as C code it would be ok (if algorithm problems are fixed), but this is not effective usage of C++ features.

Benchmarking

Usually when seriously talking about performance people also use benchmarks. Having some real statistics on multiple platforms will strengthen your argument.

Alternative approach

Now that we know that we need to pass through anyway, lets write simple loop over the whole range:

#include &lt;functional&gt;
#include &lt;array&gt;
#include &lt;utility&gt;

template &lt;typename ForwardIterator, typename Compare = std::less&lt;&gt;&gt;
std::array&lt;ForwardIterator, 2&gt; find_2greatest(ForwardIterator first, 
                                              ForwardIterator last,
                                              Compare cmp = {})
{
    if (first == last)
    {
        return {first, first};    
    }

    auto greatest = first;
    auto runner_up = greatest;

    for (++first; first != last; ++first)
    {
        if (cmp(*runner_up, *first))
        {
            runner_up = first;   
            if (cmp(*greatest, *runner_up))
            {
                std::swap(greatest, runner_up);   
            }
        }
    }

    return {greatest, runner_up};
}

#include &lt;vector&gt;
#include &lt;iostream&gt;

int main()
{
    std::vector&lt;int&gt; v{1, 1, 2, 3, 4, 5, 6};

    auto greatest2 = find_2greatest(std::begin(v), std::end(v));

    std::cout &lt;&lt; "the greatest: " &lt;&lt; *greatest2.front() &lt;&lt; '\n'
              &lt;&lt; "second greatest: " &lt;&lt; *greatest2.back() &lt;&lt; '\n';
}


The code doesn't return the objects themselves. They might be non-copyable, or user might want only the location of those elements. In general, C++ search algorithms usually return iterators. Also it is not bound to only vectors or ints, it can work on anything that allows multiple passed over the range. Your naming might be better than mine though.