Skip to content

Instantly share code, notes, and snippets.

@paul-ridgway
Last active March 25, 2021 19:31
Show Gist options
  • Save paul-ridgway/7e256b9560de559f7bd4bb09ffc4f247 to your computer and use it in GitHub Desktop.
Save paul-ridgway/7e256b9560de559f7bd4bb09ffc4f247 to your computer and use it in GitHub Desktop.
'use strict';
/*
* Complete the 'strokesRequired' function below.
*
* The function is expected to return an INTEGER.
* The function accepts STRING_ARRAY picture as parameter.
*/
function strokesRequired(picture) {
// Write your code here
return 5;
}
function main() {
let picture = `
aaaba
aaaba
aaacb`.split("\n").filter(r => !!r);
//let picture = `aaabaaaabaaaacb`.split("\n")
.filter(r => !!r).map(r => r.split(''));
const result = strokesRequired(picture);
console.log(result);
}
main();
@paul-ridgway
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment