title: Check If A Number Is Jumbled Or Not
signature: def check_if_a_number_is_jumbled_or_not(num):
test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(num, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              num),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver(67, True)
      print(f"TEST-0...{result}")
  
      result = driver(77, True)
      print(f"TEST-1...{result}")
  
      result = driver(35, False)
      print(f"TEST-2...{result}")
  
      result = driver(79, False)
      print(f"TEST-3...{result}")
  
      result = driver(45, True)
      print(f"TEST-4...{result}")
  
      result = driver(22, True)
      print(f"TEST-5...{result}")
  
      result = driver(68, False)
      print(f"TEST-6...{result}")
  
      result = driver(17, False)
      print(f"TEST-7...{result}")
  
      result = driver(5, True)
      print(f"TEST-8...{result}")
  
      result = driver(85, False)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
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;
  }