Skip to content

Instantly share code, notes, and snippets.

@kirantemojo
Last active January 25, 2017 21:09
Show Gist options
  • Save kirantemojo/6d32a8dc396ea6a0896bb3ec05d49913 to your computer and use it in GitHub Desktop.
Save kirantemojo/6d32a8dc396ea6a0896bb3ec05d49913 to your computer and use it in GitHub Desktop.
Hackerrank - Max draws - JavaScript
/**
* Hackerrank Solution - Max draws
*/
function processData(input) {
var data = input.split("\n")
var t = data[0];
for (var i = 1 ; i <= t; i += 1) {
var n = data[i].match(/\d+/g);
console.log(parseInt(n) + 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment