title: Check If A Number Is Jumbled Or Not
signature: function checkIfANumberIsJumbledOrNot(num: number): boolean {
test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: boolean, expected: boolean): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(num: number, expected:boolean): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(num),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(67, true);
    console.log(`TEST-0...${result}`);
  
    result = driver(77, true);
    console.log(`TEST-1...${result}`);
  
    result = driver(35, false);
    console.log(`TEST-2...${result}`);
  
    result = driver(79, false);
    console.log(`TEST-3...${result}`);
  
    result = driver(45, true);
    console.log(`TEST-4...${result}`);
  
    result = driver(22, true);
    console.log(`TEST-5...${result}`);
  
    result = driver(68, false);
    console.log(`TEST-6...${result}`);
  
    result = driver(17, false);
    console.log(`TEST-7...${result}`);
  
    result = driver(5, true);
    console.log(`TEST-8...${result}`);
  
    result = driver(85, false);
    console.log(`TEST-9...${result}`);
  
  };
  
  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;
  }