C-Plus-Plus
C-Plus-Plus copied to clipboard
feat: add morris in order traversal
Description of Change
Morris Inorder Traversal is a way to perform an in-order traversal of a binary tree without using recursion or a stack, by creating temporary threads to predecessors. It modifies the tree during the traversal but restores it afterward, achieving O(1) extra space complexity.
Checklist
- [x] Added description of change
- [x] Added file name matches File name guidelines
- [x] Added tests and example, test must pass
- [x] Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
- [x] Relevant documentation/comments is changed or added
- [x] PR title follows semantic commit guidelines
- [x] Search previous suggestions before making a new one, as yours may be a duplicate.
- [x] I acknowledge that all my contributions will be made under the project's license.
Notes:
thank you for your contribution. On a side note is this for hacktoberfest?
yes, it is for hacktoberfest
https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md please read the above and implement required changes
https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md please read the above and implement required changes
Do I have to change directory also or it is fine?
https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md please read the above and implement required changes
Do I have to change directory also or it is fine?
i'd recommend putting this in operations_on_datastructures, afaik morris traversal is on a tree and not on a graph
https://github.com/AYUSHSURYAVANSHI/C-Plus-Plus/commit/e1dcc3b49e30d7c9151764238d0650ab10017154#diff-86242d90684eaa0e0d368166236c68b07eee541f121514c54d02963afa395bef please add this Changes
https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTING.md please read the above and implement required changes
Do I have to change directory also or it is fine?
i'd recommend putting this in operations_on_datastructures, afaik morris traversal is on a tree and not on a graph
now check please
/assign
This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!