Created
September 4, 2019 22:53
-
-
Save nikasulo/8c55780872f281d2768fd4ac1f1a2bd1 to your computer and use it in GitHub Desktop.
Check for g, n and others
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if string[i] == 'g' | |
deque.pushBack(string[ i ]) | |
next | |
elsif string[i] == 'n' | |
deque.pushFront(string[ i ]) | |
next | |
else | |
deque.empty_into(result) unless deque.empty? | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment