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

Incorrest result for vector of 1 element #1

Closed
vladon opened this Issue Nov 7, 2015 · 9 comments

Comments

Projects
None yet
2 participants
@vladon

vladon commented Nov 7, 2015

Pass vector of 1 element (for example, { 0 }) to your function. It will return -1, but must return 0.

@mrrusof

This comment has been minimized.

Show comment
Hide comment
@mrrusof

mrrusof Nov 8, 2015

Owner

What is "your function" ?

Owner

mrrusof commented Nov 8, 2015

What is "your function" ?

@vladon

This comment has been minimized.

Show comment
Hide comment
@mrrusof

This comment has been minimized.

Show comment
Hide comment
@mrrusof

mrrusof Nov 9, 2015

Owner

You are right. Please review commit e6817b3. I claim that if condition == 0, then A.size() < 2.

Owner

mrrusof commented Nov 9, 2015

You are right. Please review commit e6817b3. I claim that if condition == 0, then A.size() < 2.

@vladon

This comment has been minimized.

Show comment
Hide comment
@vladon

vladon Nov 9, 2015

@mrrusof Now it's incorrect for { 0, 0 } :-) Must return 0, but returns 1.

vladon commented Nov 9, 2015

@mrrusof Now it's incorrect for { 0, 0 } :-) Must return 0, but returns 1.

@mrrusof

This comment has been minimized.

Show comment
Hide comment
@mrrusof

mrrusof Nov 9, 2015

Owner

@vladon Nice. What about now? 6a362df

Owner

mrrusof commented Nov 9, 2015

@vladon Nice. What about now? 6a362df

@vladon

This comment has been minimized.

Show comment
Hide comment
@vladon

vladon Nov 9, 2015

@mrrusof Sorry again, now it returns 0 for {0, 1}, but must return 1

For {0, 1, 0} it returns 0, but must return 2...

vladon commented Nov 9, 2015

@mrrusof Sorry again, now it returns 0 for {0, 1}, but must return 1

For {0, 1, 0} it returns 0, but must return 2...

@mrrusof

This comment has been minimized.

Show comment
Hide comment
@mrrusof

mrrusof Feb 14, 2016

Owner

hmmm. What about now? 51c5adb

Owner

mrrusof commented Feb 14, 2016

hmmm. What about now? 51c5adb

@mrrusof

This comment has been minimized.

Show comment
Hide comment
@mrrusof

mrrusof Apr 24, 2016

Owner

@vladon I think I fixed it. Could you please have a look?

Owner

mrrusof commented Apr 24, 2016

@vladon I think I fixed it. Could you please have a look?

@vladon vladon closed this Apr 25, 2016

@mrrusof

This comment has been minimized.

Show comment
Hide comment
@mrrusof

mrrusof Apr 25, 2016

Owner

Thank you!

Owner

mrrusof commented Apr 25, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment