© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Apache TinkerPopAT
Apache TinkerPop•3y ago•
4 replies
frazer

Beginner Gremlin Questions

Hello - I am trying to do an Advent of Code challenge as a graph problem to learn some Gremlin, and am running into some walls.

I'm working on Part 2 of Day 4. The conceit is that there are scratchcards, and that for the number of matches you have on a given card you win copies of other cards (e.g. a card with ID 3 that has two matches would win copies of the next two cards with ID 4 and 5, recursively generating more copies of cards if those two cards also had matches), and you're trying to count the total number of cards won for a given input of cards.

I've attached the graph that I'm working with (the sample input from the challenge, visible at the link above). I've parsed the input into
Card
Card
vertices with a
cardId
cardId
property, and
CardNumber
CardNumber
and
WinningNumber
WinningNumber
vertices each with a
value
value
property and a
fromCard
fromCard
edge pointing to the card they are from.
Apache TinkerPop banner
Apache TinkerPopJoin
Apache TinkerPop is an open source graph computing framework and the home of the Gremlin graph query language.
1,376Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Gremlin Injection Attacks?
Apache TinkerPopATApache TinkerPop / questions
2y ago
Gremlin Syntax Highlighter
Apache TinkerPopATApache TinkerPop / questions
3y ago
When gremlin-JavaScript release?
Apache TinkerPopATApache TinkerPop / questions
9mo ago
Gremlin Query timeout issue
Apache TinkerPopATApache TinkerPop / questions
12mo ago