findPattern

Groups the elements of an array based on a specified criterion.