code: private int maxSwaps(Set<Integer> addCandidates, Set<Integer> deleteCandidates){
          return Math.min(maxSwaps, Math.min(addCandidates.size(), deleteCandidates.size()));
      }
docs: Computes the maximum number of swaps that can be performed, given the set of candidate IDs
  for addition and deletion. Takes into account the desired maximum number of swaps \(k\) specified
  at construction (if set). The maximum number of swaps is equal to the minimum of \(k\) and the
  size of both candidate sets. Thus, if any of the given candidate sets is empty, zero is returned.
  
  @param addCandidates candidate IDs to be added to the selection
  @param deleteCandidates candidate IDs to be removed from the selection
  @return maximum number of swaps to be performed