Last active
August 4, 2021 13:30
-
-
Save erajabzadeh/d39e41a64d3e40dbab2f9aeeecd4d02c to your computer and use it in GitHub Desktop.
Gremlin Topological Sort
This file contains hidden or 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
g.V() | |
.not(__.inE()) | |
.store("x") | |
.repeat( | |
outE() | |
.store("e") | |
.inV() | |
.not(inE().where(without("e"))) | |
.store("x") | |
) | |
.cap("x"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment