[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.14630992 [View]
File: 106 KB, 490x350, __yakumo_yukari_touhou_and_1_more_drawn_by_caramelized_tomatoes__3035fe80429d84792a753e7908ec108f.png [View same] [iqdb] [saucenao] [google]
14630992

>>14630937
Maybe you can use two heaps, one keeping the top half of all inserts, the other one keeping the bottom half of all inserts, with opposite sorting order. Inserting new elements and recomputing the median should be very fast.

Navigation
View posts[+24][+48][+96]