Sliding window model of streaming Consider a variation of the conventional streaming model where we.

Sliding window model of streaming Consider a variation of the conventional streaming model where we are interested in computing a function of only the last N entries (instead of from the beginning of the stream). Given a 0–1 bit stream, design an algorithm to keep track of the number of 1s in the last N inputs using space s. Your answer can be approximate (in a multiplicative or additive manner) as a function of s. For instance, for s = N, we can get an exact answer.