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

[pascalTriangle.II]Something wrong #27

Closed
keenbin opened this issue Nov 17, 2014 · 3 comments
Closed

[pascalTriangle.II]Something wrong #27

keenbin opened this issue Nov 17, 2014 · 3 comments

Comments

@keenbin
Copy link

keenbin commented Nov 17, 2014

In code

for (int i=0; i<rowIndex; i++){
        for(int j=i+1; j>0; j--){
           v[j] += v[j-1];
        } 
    }

when i equals rowIndex-1 and j equals rowIndex, the v doesn't have the element at v[j].

@ghost
Copy link

ghost commented Nov 17, 2014

Your text is messy. You can learn Markdown here: https://guides.github.com/features/mastering-markdown/ And you should try to speak in English with @haoel and other people.

👍 I agree it seems like a careless mistake. You can try to make a pull request with your more elegant code for it.

@keenbin keenbin changed the title pascalTriangle.II.cpp 可能存在的情况 [pascalTriangle.II]Something wrong Nov 17, 2014
@keenbin
Copy link
Author

keenbin commented Nov 17, 2014

thanks! @jakwings

@haoel
Copy link
Owner

haoel commented Nov 20, 2014

@keenbin Thanks so much to find this problem! You're absolutely right, that's a serious out of boundary issue.

and I noticed you fired a pull request #31, and I accepted it yesterday. So, I will close this issue.

Thanks you again! and sorry for late response!

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