Goldmansachs CoderPad
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:
- 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.
- 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)
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.
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).