#include "bsp_1_e.h" #include #include #include #include using namespace std; vector sortvec(const vector &x, const vector &y) { vector result = x; for(size_t k = 0; k genrandvec(const int &n) { vector v; srand((unsigned) time(NULL)); for(int k=0; k gensortvec(const int & n) { vector v; for(int k = 0; k sortlist(const list &x, const list &y) { list result = x; for(auto it = y.begin(); it != y.end(); ++it) { auto pos = lower_bound(result.begin(), result.end(), *it); result.insert(pos, *it); } // check if sorted if(is_sorted(result.begin(), result.end()) == 0) { cout << "FEHLER - nicht sortiert" << endl; } return result; } list genrandlist(const int &n) { list v; srand((unsigned) time(NULL)); for(int k=0; k gensortlist(const int & n) { list v; for(int k = 0; k genlistfromvec(const vector &v) { list a; for(size_t k=0; k