Goldmansachs CoderPad

goldman sachs logo
goldman sachs
January 6, 202610 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.

Full Experience

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!

Interview Questions (2)

Q1
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.

Q2
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).

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!