Ad
Code
Diff
  • def ultimate_string_jumble_method(s):
        return sum([ord(c) for c in s.replace(' ','')])
    • def ultimate_string_jumble_method(s):
    • s = s.replace(' ','')
    • s = list(s)
    • res = 0
    • for i in s:
    • res += ord(i)
    • return res
    • return sum([ord(c) for c in s.replace(' ','')])
Code
Diff
  • getIDS <- function(string) {
      sum(as.integer(strsplit(string, "")[[1]]))
    }
    
    • getIDS <- function(string) {
    • sum(as.integer(unlist(strsplit(string, ""))))
    • sum(as.integer(strsplit(string, "")[[1]]))
    • }