Goldmansachs CoderPad

Posted
6 Jan 2026
492 reads

Summary

I was asked two coding questions during my CoderPad interview, one on finding the highest average score and another on finding the largest connected component in a forest. I also faced two behavioral questions with multiple follow-ups.

How it went

I was asked two questions shared by other recently in the LC discuss section. Here are the two questions:

  1. You are given a list of students and their scores, where a student may appear multiple times.Your task is to find the highest average score among all students.
  2. You are given key–value pairs where: key = child value = parent Together, these pairs describe a forest (a collection of trees). Your task is to find the size of the largest connected component (i.e., the largest tree).

I was also asked two behavioral questions with three follow ups on each behavioral question. Hope this helps someone else too!

Questions asked (2)

  1. 01

    Highest Average Score

    Data Structures & Algorithms

    You are given a list of students and their scores, where a student may appear multiple times.Your task is to find the highest average score among all students.

  2. 02

    Largest Connected Component in a Forest

    Data Structures & Algorithms

    You are given key–value pairs where: key = child value = parent Together, these pairs describe a forest (a collection of trees). Your task is to find the size of the largest connected component (i.e., the largest tree).

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Goldman Sachs recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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