LIST PACKING Problem statement

Note, "uppercase" and "lowercase" are just examples of "don't delete" and "do delete".

Example

Algorithm

  1. Assign a 1 to each uppercase entry, assign a 0 to each lowercase entry.
  2. perform prefix sum on the 0s and 1s.
  3. for each value (do this in parallel),
  4. Notice! last prefix sum value gives the number of packed values.

Example