A Network Algorithm for Performing Fisher’s Exact Test in r × c Contingency Tables