Properties of the bucket brigade algorithm