← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
Given a list of images and a list of pairs indicating which images are near-duplicates of each other, group all images so that any two images in the same group are near-duplicates (possibly through a chain of pairs). Formally, treat every image as a node and every pair as an undirected edge; output the connected components of this graph. Each component should be sorted in ascending order, and the list of components should be sorted by the smallest element in each component.