Goldman Sachs | CoderPad 1st round | US - Software Engineer
- Location
- US
- Posted
- 20 Feb 2026
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.
How it went
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.
Questions asked (2)
- 01
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].
- 02
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.