Created
August 29, 2019 12:27
-
-
Save nikasulo/1fad29ba621f6ffa24088f727738cad7 to your computer and use it in GitHub Desktop.
If stack is empty push first character
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 s.is_empty? | |
s.pushFront(string[i]) if string[i] == '{' || string[i] == '[' || string[i] == '(' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment