implement a function to group cells when simplifying Boolean expression using K-map
In order to implement simplification of a 5-variable Boolean expression using Karnaugh map, I write a JavaScript function to group cells (which input is a list of integers specifying minterms):