tried to optimize based on number of 0s in rows

-could not figure out why program would run forever when we called the
algorithm on rows in terms of increasing number of 0s
- reverted back to previous working solution