Like the integrator, this algorithm is very robust against noise. Because a bounce does not completely reset the counter, the latency is very consistent as well. And the combination of the count and state in a small value range allows PingPong to provide excellent debouncing with just a few bits per switch.
Another class of algorithms records the most recent signal history with the shift operator, to detect specific event patterns. Examples are the Alternative Routine by Jack Ganssle, or the Ultimate Debouncer by Elliot Williams. However, stateless pattern-matching is not ideal to detect switch events, because noise can trigger false inputs.
To fix this, the StateShift algorithm stores the active switch state in the upper bit(s), along with the signal history in the lower bits. Events are only triggered when the history is saturated with the opposite of the active state. As a result, the events are guaranteed to alternate and the algorithm is robust against noise.