Two pointer --> Beginner friendly C++ code
Intuition\n Describe your first thoughts on how to solve this problem. \nTwo pointer concept need is needed to be used. Keep pointer \'i\' in the begining and \
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nTwo pointer concept need is needed to be used. Keep pointer \'i\' in the begining and \'j\' in the end.\n# Approach\n<!-- Describe your approach to solving the problem. -->\nIncrease i and decrease j as long as they don\'t cross each other. Convert them into strings, perform string concatination then convert them into interger and then add it to the concatination value \' sum \'\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n$$O(n)$$\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n$$O(1)$$\n# Code\n```\nclass Solution {\npublic:\n    long long findTheArrayConcVal(vector<int>& nums) {\n        int i=0;\n        int j=nums.size()-1;\n        long long sum=0;\n        while(i<=j){\n            if(i==j){\n                sum+=nums[i];\n                i++;\n                j--;\n            }else{\n                sum+=stoi(to_string(nums[i])+to_string(nums[j]));\n                i++;\n                j--;\n            }\n        }\n        return sum;\n    }\n};\n```
['C++']