Two Sigma interview question

A leetcode medium problem, and then asked me to write a b-tree from scratch.