Parsing string to a grid
Parsing string to a grid
Generating all combinations, based on a partition vector
Finding partition with highest product