JSFiddle - React, Tailwind, and code Playground

by nathanlogan

JavaScript

// #Given an array of tuples, each representing used space on  a disk, find #the largest section of UNUSED space:
// # [(5, 15), (20, 75), (85, 95)], max = 100 # -> (75, 85)
// # [(20, 75), (85, 95)], max = 100 # -> (0, 20)
// # [(5, 15), (20, 75), (85, 95)], max = 125 # -> (95, 125)