Last active
November 10, 2019 00:18
-
-
Save kunigami/1f83f074178b7f4ed0e223af1134b7bb to your computer and use it in GitHub Desktop.
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
queue = [root] | |
while queue is not empty: | |
r = queue.pop() | |
for each c in r.children(): | |
output(s) = output(ps(s)) | |
if (s is match): | |
output(s).add(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment