||I'm having trouble solving this problem. How would you solve this using the pseudo code given in the tutorial for max flow (the one with 2D array and BFS).
I added a super source which has an edge to each row and a super sink which has an edge from each column. The capacity of each edge is set to 1.
Running this, I'm getting wrong answer for the third example (its the example shown in the tutorial). I'm getting 2 instead of 3.
What's wrong with my approach ?
I also gave each column a unique number.
Column j will have value (rows + j). Rows are numbered from 0 to rows - 1.