Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip branches in walking subtree #40

Open
fgregg opened this issue Sep 21, 2017 · 0 comments
Open

Skip branches in walking subtree #40

fgregg opened this issue Sep 21, 2017 · 0 comments

Comments

@fgregg
Copy link

fgregg commented Sep 21, 2017

    printf (
        "Now the trie structure is supposed to be:\n"
        "\n"
        "          +---o-> (3) -o-> (4) -l-> [5]\n"
        "          |\n"
        "          |        +---i-> (7) -z-> (8) -e-> [9]\n"
        "          |        |\n"
        "(1) -p-> (2) -r-> (6) -e-> (10) -v-> (11) -i-> (12) -e-> (13) -w-> [14]\n"
        "                   |         |\n"
        "                   |         +---p-> (15) -a-> (16) -r-> (17) -e-> [18]\n"
        "                   |\n"
        "                   +---o-> (19) -d-> (20) -u-> (21) -c-> (22) -e-> [23]\n"
        "                             |\n"
        "                             +---g-> (24) -r-> (25) -e-> (26) -s-> (27) -s-> [28]\n"
        "\n"
);

If we iterated through this using the current code, we would get

> while it.next():
>   print(it.key())
'pool'
'prize'
'preview'
'prepare'
'produce'
'progress'

Once I get to the pre prefix, I'd like to skip the branches in the and skip to the next big branch. This is the output I want

'pool'
'prize'
'preview'  (this probably needs to be here because I have to go into that branch to realize I don't want to keep going)
'produce'
'progress'

Is there a way to be at node 6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant