What is the charge flipping algorithm?