Refactor benchmark to use randomized vectors instead of sets
- Replaced std::set with std::vector for sequence handling. - Added randomization of sequences to avoid ordered input bias. - Removed unused balance function and related code in bst.cpp and bst.h. - Fixed bugs in list insertion and search logic. - Updated plot.py to allow custom y-axis labels and enable log scale for build plots.
This commit is contained in:
@@ -8,8 +8,5 @@ struct Tree {
|
||||
|
||||
Tree *insert(Tree *root, int value);
|
||||
Tree *search(Tree *root, int value);
|
||||
void traverseInOrder(Tree *root,std::vector<int> &vec);
|
||||
Tree *rebuild(std::vector<int> *vec, int start, int end);
|
||||
Tree *balance(Tree *root);
|
||||
void deleteTree(Tree *root);
|
||||
int getHeight(Tree *root, int height);
|
||||
|
||||
Reference in New Issue
Block a user