school project merge-sort using multiple threads.
#Using:
-
executor: to maintain a fixed number of threads concurrently.
-
notify() and wait(): costume controller implementation of a low level API replacement for join()
-
mutex: to lock the shared pool(array list of temp int arrays)
you can see while looping that the loop is fixed to O(log N) rounds and each one of them can iterate on n items at most. O(N log N) complexity.