Optiver interview question

DaysBetween Function and a B-Tree problem