diff --git a/DataStructures/Heap/Find the Running Median/solution.cpp b/DataStructures/Heap/Find the Running Median/solution.cpp new file mode 100644 index 0000000..52faf8b --- /dev/null +++ b/DataStructures/Heap/Find the Running Median/solution.cpp @@ -0,0 +1,52 @@ +#include + +using namespace std; + +int main() { int i,n,k; float median; cin >> n; + +vectormy; + +for(i=0;i> k; + + if(i == 0) + { + cout<::iterator pos; + + pos = upper_bound(my.begin(),my.end(),k); + my.insert(pos,k); + + /*for(int j=0;j