void insert(Node*& root, int data) { if (!root){ root = new Node(data); } else if (data < root->data){ insert(root->left,

Continue Reading## C++: Binary Search Tree Verification

struct TreeNode { int data; TreeNode *left; TreeNode *right; }; bool isBST(TreeNode *node, int minData, int maxData) { if(node == NULL

Continue Reading## C++: Brownian Tree

Generate and draw a Brownian Tree. A Brownian Tree is generated as a result of an initial seed, followed by the interaction of two processes.

Continue Reading## C++: Cycles in family tree software

I am the developer of some family tree software (written in C++ and Qt). I had no problems until one of my customers mailed me a bug report. The probl

Continue Reading## C++: Fractal Tree

Generate and draw a fractal tree. To draw a fractal tree is simple: Draw the trunk At the end of the trunk, split by some angle and draw tw

Continue Reading## C++: AVL Tree

In computer science, an AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by a

Continue Reading