moghit_ad's blog

By moghit_ad, history, 3 years ago, In English

hi everyone this is my first time trying to solve a graph problem after learning a DFS algorithm i tried to solve this one on cses but it giving WA on some test cases can anyone tell me where's prob on my code ? here's my code:https://pastebin.com/5hDaJbY4

  • Vote: I like it
  • -4
  • Vote: I do not like it

| Write comment?
»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

The code is unreadable, either use the block thing in the toolbar or put the code in pastebin and send the link

»
3 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Here is My code using DSU , You can refer this https://cses.fi/paste/f3ea0f469366ebbd2b6c58/

P.S. -> first try to solve leetcode number of island problem