title: Check If A Number Is Jumbled Or Not
signature: pub fn check_if_a_number_is_jumbled_or_not(num: i32) -> bool {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: bool, expected: bool)->bool{
  return actual==expected
  }
  pub fn driver(num: i32, expected: bool)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(num), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        67, 
        true
      ));
      
      println!("TEST-1...{}", driver(
        77, 
        true
      ));
      
      println!("TEST-2...{}", driver(
        35, 
        false
      ));
      
      println!("TEST-3...{}", driver(
        79, 
        false
      ));
      
      println!("TEST-4...{}", driver(
        45, 
        true
      ));
      
      println!("TEST-5...{}", driver(
        22, 
        true
      ));
      
      println!("TEST-6...{}", driver(
        68, 
        false
      ));
      
      println!("TEST-7...{}", driver(
        17, 
        false
      ));
      
      println!("TEST-8...{}", driver(
        5, 
        true
      ));
      
      println!("TEST-9...{}", driver(
        85, 
        false
      ));
      
  }
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;
  }