Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def strangeCode(s, e)
- first = true
- string = ""
- letter = 'a'
- while s < e - 1
- s = s + 1
- e = e - 1
- if first == true then
- string = string + 'a'
- first = false
- elsif letter == 'a' then
- string = string + 'b'
- letter = 'b'
- else
- string = string + 'a'
- letter = 'a'
- end
- end
- return string
- end
Advertisement
Add Comment
Please, Sign In to add comment