It’s exactly the same method as grouping staff by Division. You will get a Division for each worker and that will become a vital while in the map, along with the corresponding values are definitely the lists of employees assigned to that department. In such cases, the keys are classified as the sorted terms, and also the values are the dictionary