|
+3
In Honest Coach editorial i think that this code block is not necessary. Since we've sorted the vector. When we slice it in the i'th position, maximum of left array would be (i-1)'th element and minimum of right array would be i'th element so that doing it in one iteration is enough. Please correct me if i'm wrong |