EPAM Systems Interview Question

String grouping of its frequency using stream api