<script>
const res = [];
const workTime = [9, 18];
const input = [
[9, 10],
[15, 17],
[14, 16],
];
let [start, end] = workTime;
input.sort((a, b) => b[1] - a[1]).forEach(([a, b]) => {
if (b < end) res.push([b, end]);
end = Math.min(a, end);
});
if (end > start) res.push([start, end]);
document.write(JSON.stringify(res.sort(([a], [b]) => a - b)));
</script>
Вариант