LTIMindtree interview question

Oops solid princpal garbage collection