Skip to content

Instantly share code, notes, and snippets.

@kartikpandey2
Created February 12, 2019 11:41
Show Gist options
  • Save kartikpandey2/8d0a782810dfaeb254f5103d331698c9 to your computer and use it in GitHub Desktop.
Save kartikpandey2/8d0a782810dfaeb254f5103d331698c9 to your computer and use it in GitHub Desktop.
/*
* @params
* @profit array of profit for each day
* @ L, R range
*/
let count = 0;
for(let i=0; i<profit.length; ++i) {
const value = profit[i]
if(value >= L || value <=R) {
++count
}
}
return count;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment