code: public static List<Integer> msgsPerClient(int numMsgs, int numClients) {
          List<Integer> counts = new ArrayList<Integer>(numClients);
          if (numClients == 0 || numMsgs == 0) {
              return counts;
          }
          int mc = numMsgs / numClients;
          for (int i = 0; i < numClients; i++) {
              counts.add(mc);
          }
          int extra = numMsgs % numClients;
          for (int i = 0; i < extra; i++) {
              counts.set(i, counts.get(i) + 1);
          }
          return counts;
      }
docs: MsgsPerClient divides the number of messages by the number of clients and tries to distribute
  them as evenly as possible.
  
  @param numMsgs    the total number of messages
  @param numClients the total number of clients
  @return an array of message counts