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

firstMissingPositive requires solutions use constant space #19

Closed
xuewei4d opened this issue Nov 6, 2014 · 1 comment
Closed

firstMissingPositive requires solutions use constant space #19

xuewei4d opened this issue Nov 6, 2014 · 1 comment

Comments

@xuewei4d
Copy link

xuewei4d commented Nov 6, 2014

It seems that your map<int, int> cache violates the constraint.

Thanks

@haoel
Copy link
Owner

haoel commented Nov 20, 2014

Agree!

And looks the below solution is a O(n) time and O(1) space solution .
http://stackoverflow.com/questions/1586858/find-the-smallest-integer-not-in-a-list

@haoel haoel closed this as completed in 8711a9a Nov 20, 2014
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

2 participants