BioMind Interview Question

A math related leetcode problem.