Yext Interview Question

Minersweep problem related to DSA graphs