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

Max of Linked List (Sorted) #3

Open
wlievens opened this issue Jul 6, 2016 · 0 comments
Open

Max of Linked List (Sorted) #3

wlievens opened this issue Jul 6, 2016 · 0 comments

Comments

@wlievens
Copy link

wlievens commented Jul 6, 2016

In the "Heap" section, it is stated that finding the maximum value of a "Linked List (Sorted)" is O(1).

However, this is only the case for a Doubly Linked List, because to find the maximum in a sorted Singly Linked-List array, you'd have to walk the entire list, which makes it O(N).

Clarifying that it's a Doubly Linked List would probably fix this best.

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

1 participant