Brilliant Earth Interview Question

Talk me through how you would solve this math question?