Question Link -https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/rhezo-and-critical-links-3/description/
My code https://ide.codingblocks.com/s/328348
Getting TLE help!!
Rhezo and Critical Links Hackerearth
You don’t need to memset every time disc and low to zero because it is assigned initially zero for every component
Still getting wrong answer in test case 1 rest are passed,What am I missing??
You are missing the fact that you should not subtract n from size[j] instead you should subtract the total number of elements in the current component. n is the total elements not the the number of elements in a particular component.
Now …Got AC…