https://medium.com/double-pointer/partitioning-for-system-design-interview-4-number-of-partitions-a1fcd33769b6