int twoSum(const int nums[], const int n, const int target, std::vector<int>& result) { result.clear(); if (n < 2) return -1; const int* left, * right; left = nums; right = nums + n - 1; while (left < right) { const int sum = (*left + *right); if (sum == target) { result.push_back(le...