median via double heap