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
Traverse in Reverse is unnecessary complex #1092
Comments
nb |
@ivancho-ifa which algorithm? |
which algorithm |
Guys, I believe this issue is about the reverse traversal of a Linkedlist Datastructure. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The current implementation has time complexity
O(n^2)
. It could be improved toO(n)
by using recursion. I think it would be beneficial to have both approaches as it is the classic dilemma time vs. memory optimization.The text was updated successfully, but these errors were encountered: