title: Check If A Number Is Jumbled Or Not
signature: function checkIfANumberIsJumbledOrNot($num) {
test_code: <?php
  
  
  // SOLUTION CODE 
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function validateSolution($actual, $expected){
      return serialize($actual) == serialize($expected);
  }
  
  function driver($num, $expected){
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME($num), $expected)){
          return "PASSED";
        }
        return "FAILED";
      }
      catch (Exception $exception_obj) {
        return get_class($exception_obj);
      }
  }
  
  function main(){
      printf("TEST-0...%s\n",driver(
        67, 
        true));
      
      printf("TEST-1...%s\n",driver(
        77, 
        true));
      
      printf("TEST-2...%s\n",driver(
        35, 
        false));
      
      printf("TEST-3...%s\n",driver(
        79, 
        false));
      
      printf("TEST-4...%s\n",driver(
        45, 
        true));
      
      printf("TEST-5...%s\n",driver(
        22, 
        true));
      
      printf("TEST-6...%s\n",driver(
        68, 
        false));
      
      printf("TEST-7...%s\n",driver(
        17, 
        false));
      
      printf("TEST-8...%s\n",driver(
        5, 
        true));
      
      printf("TEST-9...%s\n",driver(
        85, 
        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;
  }