Sequential algorithm on 1 thread
Adds working triangular distribution algorithm