Skip to content

Instantly share code, notes, and snippets.

@kritzikratzi
Created December 14, 2010 20:14
Show Gist options
  • Save kritzikratzi/741013 to your computer and use it in GitHub Desktop.
Save kritzikratzi/741013 to your computer and use it in GitHub Desktop.
// put your PRICE_START, etc. constants at the very top of your program
int findMaxValue( int start, int end ){
int maxValue = 0;
for( int i = 0; i < lines.length; i++ ){
if( lines[i].length() >= end ){
maxValue = max( maxValue, int( lines[i].substring( start, end ) ) );
}
}
return maxValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment