I'm sharing one round of my Pinterest MLE interview. It was mainly split into two parts, Coding and ML Fundamentals.
Coding — Graph Connectivity
You are given a dictionary where the key is a group ID and the value is the elements in that group. An element can appear in multiple groups.
If two elements belong to the same group, they are considered directly related. If two elements can be connected indirectly through other elements, they are also considered related.
Define the distance between two elements:
- Distance = 1: the two elements belong to the same group.
- Distance = 2: the two elements do not belong to the same group, but there is an intermediate element that is directly related to each of them.
- Distance = N: it takes N steps to establish a connection.
- Distance = 0: there is no connection between the two elements.
Part 1: Design a class that takes the group mapping as input and implements a function to determine whether two given elements are connected.
It mainly tests Graph Construction, BFS/DFS, Connected Components, and Time & Space Complexity.
ML Fundamentals
It mainly covered:
- Time & Space Complexity
- Vanishing Gradient: what causes it, how it affects model training, and common ways to fix it.
Discussion
Loading comments…