Pergunta de entrevista da empresa Glint

A sparse matrix and find the connected components using multi threading availing all the cores. execution time criteria 3 s => good, 2s =>great 700 ms => excellent

Resposta da entrevista

Sigiloso

8 de set. de 2017

Seems code was never run by them. It dint have getter function at all! (A big Red flag, should have stopped there itself) Can solve it using brute force flood fill algo or union of sets using rank & compression. Each thread will find a single component and update the result map.