-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Some Iterative methods for binary tree traversal have visited nodes stored in a stack, which is bad for a number of reasons.
- Getting an element from a stack takes O(n) time and should be replaced by a dynamic array where getting an element from an array takes O(1) time. Generally prefer Dynamic Arrays over Linked Lists
- Another good replacement for a stack is to use flags where each object has a flag telling whether the object has been visited once already.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request