Compute statistics in data stream | Akuna Capital Interview Question