Goldman Sachs Interview Question

they were classic HackerRank questions