Find the difference between the sum of odd and even position digits
Example:
Input 1234
Output 2
Explanation:
sum of values at odd position: 1+3=4
sum of values at even position: 2+4=6
6-4=2
It's about Technology and Machines, that is the future. Welcome to the world of Deep Learning, Machine Learning, Artificial Intelligence, Data Science, Programming, Coding, Data Structures and Algorithms (DSA).
Find the difference between the sum of odd and even position digits
Example:
Input 1234
Output 2
Explanation:
sum of values at odd position: 1+3=4
sum of values at even position: 2+4=6
6-4=2