ByteDance / TikTok logoByteDance / TikTok
Coding·60 minMembers

Photo Groups via Transitive Similarity

Members only

Given a symmetric similarity matrix where `isSimilar[i][j] == 1` means photos i and j are directly similar, count the number of photo groups under transitive closure.

SWE
graph
union-find
dfs
medium
Frequency
Single report
Last asked
2026-03-05
Stage
phone-screen

Log in to continue reading the full content

Comments

Sign in to join the discussion
Loading...