✅🚀 c++ very easy two pointer approach✅🚀
\n# Code\n\nclass Solution {\npublic:\n/* simple two pointer approach --> T.C : O(N)\n\nalgo:\n\n1. Take first and last element from array.\n2. convert them int
\n# Code\n```\nclass Solution {\npublic:\n/* simple two pointer approach --> T.C : O(N)\n\nalgo:\n\n1. Take first and last element from array.\n2. convert them into string and concatenate them.\n3. add result to answer\n4. do this until all elements are traversed.\n*/\n    long long findTheArrayConcVal(vector<int>& nums) {\n        long long n=nums.size();\n        long long ans=0;\n        \n        if(n==1) return nums[0];\n        \n        long long i=0,j=n-1;\n        while(i<j){\n            string s=to_string(nums[i]) + to_string(nums[j]);\n            //cout<<s<<endl;\n            ans += stoi(s);\n            i++;\n            j--;\n        }\n        \n        if(i==j) ans += nums[i];\n        return ans;\n        \n    }\n};\n```\n# Please do upvote if you find this helpful\u2764\uFE0F! :)
['C++']