✅ very fast  C++ | with explanation
Thought process\n\nFirst: We need to concantenate every integer with it\'s corresponding integer at the same position it is from the other end.\nFor eg, in [23,
# Thought process\n\n**First:** We need to concantenate every integer with it\'s corresponding integer at the same position it is from the other end.\nFor eg, in **[23, 54, 65, 24, 87]** we need to concantanate *23 & 87* to get **2387** and then *54 & 24* to get **5424**. Since this list contains odd  number of elements there is a middle element **65** which can\'t pair up with any other element; so keep it as *65* only.\n\n**Second:** Now we need to add all the concantanated elements to a common variable. In our case it is **total**. In case of odd number of elements we separately add the middle element (in our case, 65) to total.\n\n*Note that we are performing the above to steps simultaneously. So what does it mean? We form a concatenated pair we add it to **total** variable before proceding with the next pair. It would get much clearer in the code*\n\nSo you might be wondering how do we concatenate the two integers in a pair? Let\'s see:\n\nIn **[23, 54, 65, 24, 87]** we need to first concatenate 23 and 87, right? To put 23 before 87 ( to get 2387) we need to add 2300 to 87 [that\'s one way of doing it]; we multiply 23 by 10 as many times required *to reduced 87 to 0 by dividing it with 10*.\n\nWe enter a loop with i iterating from 0 to n/2.\nFor i=0;\nnums[n/2-1-i]/=10 which is dividing 87 by 10 to give 8[int/int is int not decimal]; we multiply 23 by 10\nthen again, nums[n/2-1-i]/=10 which is dividing 8 by 10 to give 0[int/int is int not decimal]; we multiply 230 by 10\n\nthen we add 2300 and 87 to **total** variable and continue doing the same for other variables\n\nDon\'t Worry if you are still confused, have a look at the code, you will get it :)\n\n# Code\n\n``` C++ []\nclass Solution {\npublic:\n    long findTheArrayConcVal(vector<int>& nums) {\n        int n = nums.size(), x{0};\n        long total{0};\n\n        // we iterate through the i=0 to i=n/2\n        for (int i{0}; i<n/2; i++) {\n\n            // we store the (n-i-1)th term in variable x, as we are going to tamper with it\n            x = nums[n-i-1];\n            // we see the number of places present before the decimal in the (n-i-1)th term and\n            // multiply the i th term by 10 so that we get the correct number to add to total variable\n            // we repeat this process till the (n-i-1)th term is 0\n            while (nums[n-i-1]>0) {\n                nums[n-i-1]/=10;\n                nums[i]*=10;\n            }\n            total+=x+nums[i];\n        }\n\n        // if there are a odd number of term the middle term is unaccounted for\n        // as it is not include in the iteration of i from 0 to n/2\n        if (n%2==1) total+=nums[n/2];\n        return total;\n    }\n};\n```\n\n![kitty.jpeg](https://assets.leetcode.com/users/images/60068b30-3d6b-4b47-bbac-27b017b22779_1676186318.071066.jpeg)\n
['C++']