Apex › Distributed systems

Boyer-Moore majority vote

Find the element making up more than half a stream in one pass with a single counter. Step through the cancellation and watch the true majority survive — then a verification pass confirm or reject it.

More in Distributed systems