C++ 100% two indexes
Approach\nUse left and right indexes to iterate thtough nums.\n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\ncpp []\nclass So
# Approach\nUse left and right indexes to iterate thtough nums.\n\n# Complexity\n- Time complexity:\n$$O(n)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    long long findTheArrayConcVal(const vector<int>& nums) const {\n        if (nums.size() == 1) {\n            return nums.front();\n        }\n        long long sum = 0;\n        for (size_t left = 0, right = nums.size() - 1; left <= right; ++left, --right) {\n            const std::string tmp = (left == right) ? std::to_string(nums[left]) : std::to_string(nums[left]) + std::to_string(nums[right]);\n            sum += std::stoi(tmp);\n        }\n        return sum;\n    }\n};\n```
['C++']