javascript-algorithms icon indicating copy to clipboard operation
javascript-algorithms copied to clipboard

Traverse in Reverse is unnecessary complex

Open ivancho-ifa opened this issue 1 year ago • 4 comments

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.

ivancho-ifa avatar Dec 10 '23 18:12 ivancho-ifa

nb

dahkjh avatar Dec 25 '23 15:12 dahkjh

@ivancho-ifa which algorithm?

faresh9 avatar Jan 02 '24 15:01 faresh9

which algorithm

Sanjay10tech avatar Jan 17 '24 16:01 Sanjay10tech

Guys, I believe this issue is about the reverse traversal of a Linkedlist Datastructure.

leoimewore avatar Jan 24 '24 12:01 leoimewore