BEATS 100% | 2 PTR | EASY | EXPLAINED
\n\n# Intuition\n Describe your first thoughts on how to solve this problem. \nThe intuition is simply to directly take two pointers and start concatnating the 
![image.png](https://assets.leetcode.com/users/images/f3afb561-510e-40c0-923e-beabf33be059_1703164715.674822.png)\n\n# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nThe intuition is simply to directly take two pointers and start concatnating the numbers.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. As per the constraints for easy concatenation we will use strings rather than making the number.\n2. Then we will keep adding that number till the loop runs.\n3. In last check condition for odd elements and add it to concVal;\n4. Return concVal.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n     O(n(log(a)+log(b)))\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n     O(n(log(a)+log(b)))\n\n# Code\n```\nclass Solution {\npublic:\n    int concatenate(int& a,int& b){\n        string s=to_string(a)+to_string(b);\n        return stoi(s);\n    }\n    long long findTheArrayConcVal(vector<int>& nums) {\n        long long concVal=0;\n        int i=0;\n        int j=nums.size()-1;\n        while(i<j){\n            concVal+=concatenate(nums[i],nums[j]);\n            i++;\n            j--;\n        }\n        if (i==j){\n            concVal+=nums[i];\n        }\n        return concVal;\n    }\n};// HOPE YOU HAVE GOT IT!! :)\n```\n# PLEASE UPVOTE GUYS!!\n![UPVOTE.jpg](https://assets.leetcode.com/users/images/9473abd8-0713-4982-9362-228da1ad1386_1703165151.3243978.jpeg)\n
['C++']