Goldman Sachs Interview Question

Hackerrank had both math and coding questions