you give list close interval firstlist secondlist firstListi starti endi secondListj startj endj each list interval pairwise disjoint sort orderreturn intersection interval listsA close interval b b denote set real number x x bThe intersection close interval set real number represent closed interval for example intersection 1 3 2 4 2 3 Example 1input firstlist 0251013232425 secondlist 1581215242526output 1255810152324242525example 2input firstlist 1359 secondList output Constraints0 firstlistlength secondlistlength 1000firstlistlength secondlistlength 10 starti endi 109endi starti10 startj endj 109endj startj1