### Omar_Mekkawy's blog

By Omar_Mekkawy, history, 4 years ago, ,

Regarding finding articulation points, we use dfs order (dfs time) , to know the exact time of visiting this node, taking the maximum time of my children to assign if i'm articulation , and the minimum is returned to my parent,

i tried to switch the dfs order to using depth , meaning that the dfs order of the node is it's depth and i take the maximum depth for myself and return the minimum depth to my parent, but it hasn't been working i've been getting wrong answers,

Should it work or not, and if not could you provide the test case?

• +8

 » 4 years ago, # |   0 Auto comment: topic has been updated by Omar_Mekkawy (previous revision, new revision, compare).
•  » » 4 years ago, # ^ |   0 can you post question s on cut vertex and cut edges...
 » 4 years ago, # | ← Rev. 2 →   +3 Could you link the problem and your code? The depth change looks fine to me, i changed my code to your approach on a UVA problem and it also gets AC
•  » » 4 years ago, # ^ |   0 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=251well i lost my code, just tell me if you got AC in this problem and i'll try to guess what was my mistake ;)
•  » » » 4 years ago, # ^ |   +3 That was the exactly same problem i worked upon. It gets AC
•  » » » » 4 years ago, # ^ | ← Rev. 2 →   +3 thank you it's my bug then would u provide ur code please? , wonder why the initial algorithm didn't use depth it's easier anyway .
•  » » » » » 4 years ago, # ^ |   +3 Here's the code: http://ideone.com/vcbqE0 There weren't much changes though, only 2-3 lines. But yeah this looks much easier then numbering