Your Submissions
You haven't submitted any code for this challenge yet. Solve the problem by passing all the test cases, and your submissions will appear here.
xxxxxxxxxx
27
var assert = require('assert');
/**
* @param {number[]} nums
* @return {boolean}
*/
function maxLeaps(nums) {
// figure this out
return nums;
}
try {
assert.equal(maxLeaps([1, 3, 2, 2, 1]), true);
console.log('PASSED: ' + '`maxLeaps([1, 3, 2, 2, 1])` should return `true`');
} catch (err) {
console.log(err);
}
try {
assert.equal(maxLeaps([2, 1, 0, 1, 4]), false);
console.log('PASSED: ' + '`maxLeaps([2, 1, 0, 1, 4])` should return `false`');
} catch (err) {
console.log(err);
}
OUTPUT
Results will appear here.