Question: I get this error when I try to compile my program. It has to do with the way I'm constructing the map, but I really can't see something wrong:

```
error: expected identifier before numeric constant 
map <int , vector <int> >  radixM (10 , vector <int> (100));

```

Any ideas?

Answer: 
When the access pattern is lots of reads and occasional writes, you can protect an unsyncronized data structure with a `ReentrantReadWriteLock`. It allows multiple readers, but only a single writer.

Depending on your implementation, you might also benefit from using a `ConcurrentHashMap`.

You *might* be able to cheat a bit and use either an `AtomicIntegerArray` or an `AtomicReferenceArray` of `Futures/CompletionStages`.
Store the results of each thread in a stack. One thread collects results from every thread and adds them together. Of course the stack should not be empty.

If you want multiple threads to work on factorials why not create a thread or two that produce a list of factorial results. Other threads can just look up results if needed.