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

Traverse in Reverse is unnecessary complex #1092

Open
ivancho-ifa opened this issue Dec 10, 2023 · 4 comments
Open

Traverse in Reverse is unnecessary complex #1092

ivancho-ifa opened this issue Dec 10, 2023 · 4 comments

Comments

@ivancho-ifa
Copy link

The current implementation has time complexity O(n^2). It could be improved to O(n) by using recursion. I think it would be beneficial to have both approaches as it is the classic dilemma time vs. memory optimization.

@dahkjh
Copy link

dahkjh commented Dec 25, 2023

nb

@faresh9
Copy link

faresh9 commented Jan 2, 2024

@ivancho-ifa which algorithm?

@Sanjay10tech
Copy link

which algorithm

@leoimewore
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants