Two Pointer Simple C++
\n# Code\n\nclass Solution {\npublic:\n    long long findTheArrayConcVal(vector<int>& nums) {\n        int n = nums.size(), l, r;\n        l = 0; r = n-1;\n    
\n# Code\n```\nclass Solution {\npublic:\n    long long findTheArrayConcVal(vector<int>& nums) {\n        int n = nums.size(), l, r;\n        l = 0; r = n-1;\n        long long int ans = 0;\n        while (l <= r) {\n            if (l == r) {\n                ans += nums[l];\n                break;\n            }\n            string a = to_string(nums[l++]);\n            string b = to_string(nums[r--]);\n            a = a+b;\n            ans += stoi(a);\n        }\n        return ans;\n    }\n};\n```
['Two Pointers', 'C++']