How to Partition an Array ========================= Suppose the array is of size n Suppose we have p processes, with id-s in [ 0, p ) Then process id should work on the range [ (id * n) / p, ((id + 1) * n) / p ) Example: n = 11 p = 4 Thread 0 Thread 1 Thread 2 Thread 3 [0, 2) [2, 5) [5, 8) [8, 11)