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

Answer to ex 2.4.12 can be more complete #311

Open
denispar opened this issue Jan 5, 2025 · 0 comments
Open

Answer to ex 2.4.12 can be more complete #311

denispar opened this issue Jan 5, 2025 · 0 comments

Comments

@denispar
Copy link

denispar commented Jan 5, 2025

In an unordered array it is O(n).

See ex 2.4.2

If you have an unordered array plus keep track of the maximum, "find the maximum" is O(1).

The answer depends on how you see the "underlying structure". As an array and nothing else or as an array and a variable.

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