Which one of the operation is better to find the max element?
I am trying to find the max initial-weight where initial-weight can be from 1-127 for multiple elements each having some initial-weight.
Please let me know which approach is better? Atomic operation or adding in a set and then finding the max of it.
Also, if there is a better way of doing it.
1