Find tree root and bucket numbers | Bloomberg Interview Question