Last active
August 25, 2017 20:10
-
-
Save robwhitaker/a22fd5d2b454812317cae02f50604bdf to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function mindPsAndQs(input) { | |
return input.match(/[PQ]+/g).reduce(function(acc, str) { | |
return Math.max(acc, str.length); | |
}, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment