title: Check If A Number Is Jumbled Or Not
signature: fun checkIfANumberIsJumbledOrNot(num: Int): Boolean {
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;
  }
question_info.test_list: [{"idx": 0, "outputs": true, "inputs": {"num": 67}}, {"idx": 1, "outputs": true, "inputs": {"num": 77}}, {"idx": 2, "outputs": false, "inputs": {"num": 35}}, {"idx": 3, "outputs": false, "inputs": {"num": 79}}, {"idx": 4, "outputs": true, "inputs": {"num": 45}}, {"idx": 5, "outputs": true, "inputs": {"num": 22}}, {"idx": 6, "outputs": false, "inputs": {"num": 68}}, {"idx": 7, "outputs": false, "inputs": {"num": 17}}, {"idx": 8, "outputs": true, "inputs": {"num": 5}}, {"idx": 9, "outputs": false, "inputs": {"num": 85}}]
question_info.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Boolean, expected:Boolean):Boolean{
    return actual.equals(expected)
  }
  fun driver(num: Int, expected:Boolean):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(num), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(67, true)
      println("TEST-0...${result}")
      
      result = driver(77, true)
      println("TEST-1...${result}")
      
      result = driver(35, false)
      println("TEST-2...${result}")
      
      result = driver(79, false)
      println("TEST-3...${result}")
      
      result = driver(45, true)
      println("TEST-4...${result}")
      
      result = driver(22, true)
      println("TEST-5...${result}")
      
      result = driver(68, false)
      println("TEST-6...${result}")
      
      result = driver(17, false)
      println("TEST-7...${result}")
      
      result = driver(5, true)
      println("TEST-8...${result}")
      
      result = driver(85, false)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: checkIfANumberIsJumbledOrNot
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn