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

findMinimumInRotatedSortedArray not accept #15

Closed
yangdm0209 opened this issue Oct 31, 2014 · 4 comments
Closed

findMinimumInRotatedSortedArray not accept #15

yangdm0209 opened this issue Oct 31, 2014 · 4 comments

Comments

@yangdm0209
Copy link

https://github.com/haoel/leetcode/blob/master/src/findMinimumInRotatedSortedArray/findMinimumInRotatedSortedArray.cpp
Not worked for this test case
{ 2, 3, 1, 4, 5, 6, 7 }

@haoel
Copy link
Owner

haoel commented Oct 31, 2014

I just re-tested it, it's no problem! could you please double check it?

@yangdm0209
Copy link
Author

int main(int argc, char** argv)
{
#if 1 // test case { 2, 3, 1, 4, 5, 6, 7 }; the min is 1
vector num;
num.push_back(2);
num.push_back(3);
num.push_back(1);
num.push_back(4);
num.push_back(5);
num.push_back(6);
num.push_back(7);
int rst = findMin(num);
printf("%d\n", rst);
#else
....
#endif
return 0;
}


print 2

@haoel
Copy link
Owner

haoel commented Oct 31, 2014

Oh, I see! the problem here is the test data { 2, 3, 1, 4, 5, 6, 7 }; which is not rotated sorted array !

@yangdm0209
Copy link
Author

Oh,sorry! I know !

发自我的 Windows Phone


发件人: Hao Chenmailto:notifications@github.com
发送时间: ‎2014/‎10/‎31 18:20
收件人: haoel/leetcodemailto:leetcode@noreply.github.com
抄送: yangdm0209mailto:yangdm0209@outlook.com
主题: Re: [leetcode] findMinimumInRotatedSortedArray not accept (#15)

Oh, I know! the array { 2, 3, 1, 4, 5, 6, 7 }; is not rotated sorted array !


Reply to this email directly or view it on GitHub:
#15 (comment)

@haoel haoel closed this as completed Nov 3, 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