title: Check If A Number Is Jumbled Or Not
signature: check_if_a_number_is_jumbled_or_not <- function(num) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(num, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(num), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          67L, 
          TRUE
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          77L, 
          TRUE
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          35L, 
          FALSE
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          79L, 
          FALSE
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          45L, 
          TRUE
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          22L, 
          TRUE
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          68L, 
          FALSE
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          17L, 
          FALSE
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          5L, 
          TRUE
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          85L, 
          FALSE
      )))
  
  }
  
  main()
source_py: def check_if_a_number_is_jumbled_or_not(num):
      if ((num // 10) == 0):
          return True
      while (num != 0):
          if ((num // 10) == 0):
              return True
          digit1 = (num % 10)
          digit2 = ((num // 10) % 10)
          if (abs((digit2 - digit1)) > 1):
              return False
          num = (num // 10)
      return True
source_cpp: bool check_if_a_number_is_jumbled_or_not(int num) {
    if ( num / 10 == 0 ) return true;
    while ( num != 0 ) {
      if ( num / 10 == 0 ) return true;
      int digit1 = num % 10;
      int digit2 = ( num / 10 ) % 10;
      if ( abs ( digit2 - digit1 ) > 1 ) return false;
      num = num / 10;
    }
    return true;
  }