Goldman Sachs | CoderPad 1st round | US - Software Engineer

goldman sachs logo
goldman sachs
· Software Engineer· US
February 20, 2026 · 2 reads

Summary

I had a 1 hour 15 minute CoderPad interview for a Software Engineer role at Goldman Sachs, where I was asked two Data Structures & Algorithms questions.

Full Experience

It was 1:15hrs long interview, and I was asked 2 DSA questions:

1. Given a list of student and scores, return the max average of all students.

It's basically the High Five problem (easy) on leetcode, but even easier in a way, that you don't need a min heap as a key, but just a list of [total of scores, number of scores].


2. Return the ID of the tallest tree given a forest with many unconnected trees (dictionary with child -> parent). If two trees have the same height, return the ID with lesser value.

Input: {2:3, 3:5, 4:5, 8:9} -> Return 5, since it is the root of the tallest tree.

Build an adjaceny list, and also store all_nodes and children in 2 separate sets. We can get the roots by doing set subtraction (all_nodes - children). Then implement DFS, and call DFS on each root to get the tree height.

Interview Questions (2)

1.

Max Average of All Students

Data Structures & Algorithms·Easy

Given a list of student and scores, return the max average of all students. It's basically the High Five problem (easy) on leetcode, but even easier in a way, that you don't need a min heap as a key, but just a list of [total of scores, number of scores].

2.

Tallest Tree in a Forest

Data Structures & Algorithms

Return the ID of the tallest tree given a forest with many unconnected trees (dictionary with child -> parent). If two trees have the same height, return the ID with lesser value.

Input: {2:3, 3:5, 4:5, 8:9} -> Return 5, since it is the root of the tallest tree.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!