This will be a long post, including many questions solved from geeksforgeeks. I will continue to develop this with time. please follow regularly to see more solutions. write a Function to print the sum of all leaf nodes: int sumLeaf(Node* root) { int sum=0; if(root==NULL) {return 0;} else { if(root->left==NULL && root->right==NULL) { sum+=root->data; } else { if(root->left!=NULL && root->right!=NULL) {sum=sumLeaf(root->left)+sumLeaf(root->right);} if(root->left!=NULL && root->right==NULL) {sum=sumLeaf(root->left);} if(root->right!=NULL && root->left==NULL) {sum=sumLeaf(root->right);} } } return sum; } write a Function to print the minimum element in a binary search tree: int Minvalue(Node* root) { int data; if(ro
I write about machine learning models, python programming, web scraping, statistical tests and other coding or data science related things I find interesting. Read, learn and grow with me!