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

Change traverse implemention to in-order traverse #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Change traverse implemention to in-order traverse #216

wants to merge 1 commit into from

Conversation

qiuchengxuan
Copy link

the current traverse implemention has several weakness:

  1. unable to stop traverse, thus unable to reduce traverse time
    complexity around O(logN)
  2. out-of-order, ordinary traverse method should be pre-order, in-order,
    post-order, but the current implemention belongs none of them
  3. memory cost, since traversing in flat levels, maximum memory usage
    will reach to nearly half tree width

@aviary2-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

the current traverse implemention has several weakness:
1. unable to stop traverse, thus unable to reduce traverse time
   complexity around O(logN)
2. out-of-order, ordinary traverse method should be pre-order, in-order,
   post-order, but the current implemention belongs none of them
3. memory cost, since traversing in flat levels, maximum memory usage
   will reach to nearly half tree width
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

Successfully merging this pull request may close these issues.

2 participants