void process(int, int); int main(int argc, char **argv){ - if arguments are not correct, give an error message and quit - receive locations of people in the given file and assign proper values to all squares on the grid - go through each square on the grid, find the groups, and store them into a vector - output results to the output file, specified by the command line } /* precondition: x and y can never go out of the grid’s bounds postcondition: tempvx and tempvy will contain people belonging to a group */ void process(int x, int y) { - mark square (x, y) handled - store them in two vectors, tempvx and tempvy - if the east square is occupied and not handled yet, call process on that square - if the west square is occupied and not handled yet, call process on that square - if the north square is occupied and not handled yet, call process on that square - if the south square is occupied and not handled yet, call process on that square }You can, of course, find the groups without using a recursion. For example, scan the board and if a particular square is occupied, see if it belongs to any of the groups stored previously. If so, store it as belonging to that group. If not, store it as a new group. This algorithm works but it is not as cool as the recursive version, is it?