From 35185dc7d24ec42f1ab7c5efe31428f5a82eed6d Mon Sep 17 00:00:00 2001 From: SAM <73647831+samhackathon@users.noreply.github.com> Date: Tue, 31 Oct 2023 13:07:01 +0500 Subject: [PATCH] Delete deltion directory --- deltion/traversal.cpp | 51 ------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 deltion/traversal.cpp diff --git a/deltion/traversal.cpp b/deltion/traversal.cpp deleted file mode 100644 index 3db55fcb7db..00000000000 --- a/deltion/traversal.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// C++ code to implement the approach - -#include -using namespace std; - -// Class describing a node of tree -class Node { -public: - int data; - Node* left; - Node* right; - Node(int v) - { - this->data = v; - this->left = this->right = NULL; - } -}; - -// Inorder Traversal -void printInorder(Node* node) -{ - if (node == NULL) - return; - - // Traverse left subtree - printInorder(node->left); - - // Visit node - cout << node->data << " "; - - // Traverse right subtree - printInorder(node->right); -} - -// Driver code -int main() -{ - // Build the tree - Node* root = new Node(100); - root->left = new Node(20); - root->right = new Node(200); - root->left->left = new Node(10); - root->left->right = new Node(30); - root->right->left = new Node(150); - root->right->right = new Node(300); - - // Function call - cout << "Inorder Traversal: "; - printInorder(root); - return 0; -}