I simple example of synchronizing threads. It has multiple branches with the highest branch being the best algorithmically.