Maintain streaming median and loosemedian | Google Interview Question