Some error occured while loading page for you. Please try again.
You are viewing a single comment's thread. Return to all comments →
My Solution:
function processData(input) { var strs = input.split("\n"); for (var i = 1; i< strs.length; i++) { var tempStr = strs[i]; var changeReq = 0; for (var j = 0; j < Math.floor(tempStr.length / 2); j++) { changeReq = changeReq + Math.abs(tempStr.charCodeAt(j) - tempStr.charCodeAt((tempStr.length - 1) - j)); } console.log(changeReq); } }
Add Reply Preview cancel
Create An Account
Or connect with
By signing up you agree to our Terms of Service and Privacy Policy
My Solution:
Add Reply Preview cancel