struct list { median --> median from the start to num number --->number list *next };
during insertion : insert in sorted LL after that all subseq node's median has to be modified O(n) during median_retriev check the median value and return that O(1) I assumed deletion is not happening. if supported , can be done in O(n) On Sep 15, 8:24 pm, bittu <shashank7andr...@gmail.com> wrote: > Propose a data structure that would store numbers, without any > knowledge about them, and allow to perform the operations: insert, get > median, as efficiently as possible same as before, only this time the > numbers are from a group V, which is |V|<<n -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algoge...@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.