Advertisement
Guest User

Untitled

a guest
Apr 30th, 2022
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. if the length of the string is less than one return true
  2.  
  3. else if the first letter is greater than the second letter
  4. return call to recursive method with everything in string after first letter
  5.  
  6. else
  7.  
  8. return false
  9.  
  10. cannot be A or B because would return false because a < b
  11. cannot be C because would eventually return false
  12. D would work because e > d > c > b > a, eventually becoming <= 1; returning true
  13.  
  14.  
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement