Take the tour ×  Hi I am stuck in between the concept of Map in
STL Library/C++.  int arr[] =
{10,15,14,13,17,15,16,12,18,10,29,24,35,36}; int n = sizeof arr
/ sizeof *arr;  map<int, bool> bst; map<int, bool>::iterator it;
vector<int> median_output;  const int k = 5;
bst.insert(make_pair(arr[i], true));  for (it = bst.begin(); it
!= bst.end(); it++) {     cout << (*it).first << " ";  Now when
i printed this map, it got printed in sorted Order. Now is there
any simplest way to find the middle of this map..... Need to
find the median of a bigger problem... So trying to implement
balanced binary search tree..  share|improve this question an
augmented binary search tree supports O(log n) query for k-th
element. but stl implementation does not have that by default
and (i guess) it is not possible to use the existing tree code
in stl to archives that. you have to write your own balanced
BSTs for this kind of query. –  Yin Zhu Jun 10 '11 at 7:37 Do
you really need a map, or do you just want to find the median of