680 likes | 776 Views
Depth First Search. open site. dfs(0, 0). blocked site. reachable from top via open sites. 0. 1. 2. 3. 4. 0. 1. 2. 3. 4. Depth First Search. open site. dfs(0, 0). blocked site. reachable from top via open sites. 0. 1. 2. 3. 4.
E N D
Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 0 1 2 3 4
Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up dfs(0, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up dfs(0, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(0, 0) dfs(1, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(0, 0) dfs(1, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(0, 0) dfs(1, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(0, 0) dfs(1, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(0, 0) dfs(1, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up dfs(0, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up dfs(0, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up dfs(0, 0) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(2, 2) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(2, 2) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(3, 2) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(3, 2) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(3, 2) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(3, 2) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(3, 2) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(2, 2) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(2, 2) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(2, 1) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(2, 1) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(2, 1) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(2, 1) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(2, 1) dfs(2, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(2, 2) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(1, 4) dfs(1, 3) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 2) dfs(1, 4) dfs(1, 3) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(2, 4) dfs(1, 4) dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(2, 4) dfs(1, 4) dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(3, 4) dfs(2, 4) dfs(1, 4) dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(3, 4) dfs(2, 4) dfs(1, 4) dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 4) dfs(0, 2) dfs(3, 4) dfs(4, 4) dfs(2, 4) dfs(1, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 4) dfs(0, 2) dfs(3, 4) dfs(4, 4) dfs(2, 4) dfs(1, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 4) dfs(0, 2) dfs(3, 4) dfs(4, 4) dfs(2, 4) dfs(1, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 4) dfs(0, 2) dfs(3, 4) dfs(4, 4) dfs(2, 4) dfs(1, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(1, 3) dfs(1, 4) dfs(0, 2) dfs(3, 4) dfs(4, 4) dfs(2, 4) dfs(1, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(3, 4) dfs(2, 4) dfs(1, 4) dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()
mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up mark down right left up dfs(3, 4) dfs(2, 4) dfs(1, 4) dfs(1, 3) dfs(1, 2) dfs(0, 2) Depth First Search open site dfs(0, 0) blocked site reachable from top via open sites 0 1 2 3 4 dfs(0, 0) dfs(0, 1) dfs(0, 2) dfs(0, 3) dfs(0, 4) 0 1 2 3 4 flow()