Using lambda function,to_string and stoll
Complexity\n- Time complexity:\nO(n/2)\n\n- Space complexity:\nO(1)\n\n# Code\n\nclass Solution {\npublic:\n    typedef long long ll;\n    long long findTheArra
# Complexity\n- Time complexity:\n$$O(n/2)$$\n\n- Space complexity:\n$$O(1)$$\n\n# Code\n```\nclass Solution {\npublic:\n    typedef long long ll;\n    long long findTheArrayConcVal(vector<int>& nums) {\n        ll n=nums.size();\n        ll total=0;\n        for(int i=0;i<n/2;i++){\n            [&total](int a,int b){total+=stoll(to_string(a)+to_string(b));}(nums[i],nums[n-i-1]);\n        }\n        if(n%2!=0){\n            total+=nums[n/2];\n        }\n        return total;\n    }\n};\n```
['C++']