Playlist Song Connection
Pinterest interview questions · Medium · Coding round · 6 tests
Treat songs as nodes and playlists as edges, then count how many transitive song groups exist.
The full question, tests and reference solution are available with a plan that includes Pinterest.
Run your code with Ctrl+Enter to see results.