Created
April 29, 2013 15:42
-
-
Save kelchm/5482460 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
F = new int[n][w]; | |
// Initialize first row and first column to zero | |
for(int i = 0; i<n; i++) | |
{ | |
F[i][0] = 0; | |
} | |
for(int i = 0; i<w; i++) | |
{ | |
F[0][i] = 0; | |
} | |
// Initialize remaining locations to -1 | |
for(int i = 1; i<n; i++) | |
{ | |
for(int j = 1; j<w; j++) | |
{ | |
F[i][j] = -1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment