daily pastebin goal
45%
SHARE
TWEET

Untitled

a guest Dec 11th, 2018 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def isAscending(list): return isAscendingHelp(list, len(list) - 1, len(list) - 2)
  2.  
  3. def isAscendingHelp(list, high, low):
  4.   if high - low == -1:
  5.     return true
  6.   else:
  7.     if len(list) == 0:
  8.       return true
  9.     else:
  10.       if list[high] - list[low] == 1:
  11.         isAscendingHelp(list, high - 1, low - 1)        
  12.       else:
  13.         return false
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top