My Solution: Iterate every node and do dfs on un-visited node. Is there any better solution?
Problem number 11 from ICO online judge. I tried by using a list but it failed can anyone post hints please?
Thanks