Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. #pragma once
  2. //using namespace std;
  3.  
  4. struct RBTElem {
  5. RBTElem* parent, *left, *right;
  6. int key;
  7. char color;
  8. };
  9.  
  10. class Drzewo {
  11.  
  12.  
  13. public:
  14.  
  15. RBTElem* root;
  16. RBTElem guard;
  17. int count;
  18. Drzewo();
  19. ~Drzewo();
  20.  
  21.  
  22.  
  23. //void display(RBTElem*, int);
  24. void push(int);
  25. void pop(int);
  26. void fixPush(RBTElem*);
  27. // void fixPop(RBTElem*);
  28. bool search(int);
  29.  
  30. RBTElem* minimum(RBTElem*);
  31. RBTElem* successor(RBTElem*);
  32.  
  33.  
  34. void rotateRight(RBTElem*);
  35. void rotateLeft(RBTElem*);
  36.  
  37.  
  38.  
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement