Accenture interview question

groupingby using java 8 streams