You can actually use segmented scan to solve the histogram problem from quiz 2.
histogram[A[i]] = count[i]+1
count[i+1] == 0
Since the question gave us N processors, this should make good use of them since the steps that don't involve a library call are all O(1) span.
Just for clarification, exclusive scan includes the "base case", but not the final sum of the sequence. On the other hand, an inclusive scan would not include the base case, but would include the final sum. For example:
segmented_scan_exclusive(+, A) = [[0, 1], , [0, 1, 3, 6]
segmented_scan_inclusive(+, A) = [[1, 3], , [1, 3, 6, 10]]
This was probably covered in an earlier lecture, but it confused me for a while, so I figured I might as well leave a note!