Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function scheduling(input) {
- let jobs = input.shift().split(", ").map(Number), index = Number(input.shift());
- console.log(jobs.filter(x => x <= jobs[index]).reduce((a, b) => a + b, 0));
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement