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

Sockets - Hana #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Sockets - Hana #32

wants to merge 2 commits into from

Conversation

hanalways
Copy link

No description provided.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice iterative solution. See my note on the space complexity, but this is very well done.

# Time complexity: ?
# Space complexity: ?
# Time complexity: O(n), where n is the the number of values in the array
# Space complexity: O(c), where c is the integers that are being rewritten

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The space complexity is actually O(1) since it does not increase with the size of n.

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

Successfully merging this pull request may close these issues.

2 participants