daily pastebin goal
96%
SHARE
TWEET

lab3zad2.h

michalkowalczyk Mar 19th, 2019 57 in 329 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifndef FUNCTIONS_H
  2. #define FUNCTIONS_H
  3. #include<iostream>
  4. #include<memory>
  5. #include<sstream>
  6.  
  7.  
  8.  
  9.  
  10.  
  11. struct node{
  12.         int value;
  13.  
  14.         std::unique_ptr<node> left_child;
  15.         std::unique_ptr<node> right_child;
  16.  
  17.  
  18.     };
  19.  
  20. std::unique_ptr<node> CreateLeaf(int val);
  21. std::unique_ptr<node> InsertNode(std::unique_ptr<node> root,int val);
  22. void PrintTreeInOrder(const std::unique_ptr<node> &root);
  23. void PrintTreePreOrder(const std::unique_ptr<node> &root);
  24. void PrintTreePostOrder(const std::unique_ptr<node> &root);
  25. std::string DumpTree( std::unique_ptr<node> &root);
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33. #endif // FUNCTIONS_H
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top