Created
February 12, 2019 11:41
-
-
Save kartikpandey2/8d0a782810dfaeb254f5103d331698c9 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
/* | |
* @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