From 755584aecde45bd359e6848dc4d5a10f1fce93e0 Mon Sep 17 00:00:00 2001 From: nitishji <40134429+nitishji@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:05:12 +0530 Subject: [PATCH 01/10] Update Binary_Tree --- Binary_Tree | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/Binary_Tree b/Binary_Tree index 7c33453..8ccbe07 100644 --- a/Binary_Tree +++ b/Binary_Tree @@ -1,33 +1,33 @@ -A binary tree is a structure comprising nodes, where each node has the following 3 components: +//A binary tree is a structure comprising nodes, where each node has the following 3 components: - Data element: Stores any kind of data in the node - Left pointer: Points to the tree on the left side of node - Right pointer: Points to the tree on the right side of the node + // Data element: Stores any kind of data in the node + // Left pointer: Points to the tree on the left side of node + //// Right pointer: Points to the tree on the right side of the node -As the name suggests, the data element stores any kind of data in the node. -The left and right pointers point to binary trees on the left and right side of the node respectively. +//As the name suggests, the data element stores any kind of data in the node. +//The left and right pointers point to binary trees on the left and right side of the node respectively. -If a tree is empty, it is represented by a null pointer. +//If a tree is empty, it is represented by a null pointer. -The following image explains the various components of a tree. +//The following image explains the various components of a tree. -enter image description here +//enter image description here -Commonly-used terminologies +//Commonly-used terminologies - Root: Top node in a tree - Child: Nodes that are next to each other and connected downwards - Parent: Converse notion of child - Siblings: Nodes with the same parent - Descendant: Node reachable by repeated proceeding from parent to child - Ancestor: Node reachable by repeated proceeding from child to parent. - Leaf: Node with no children - Internal node: Node with at least one child - External node: Node with no children + // Root: Top node in a tree + // Child: Nodes that are next to each other and connected downwards + // Parent: Converse notion of child + // Siblings: Nodes with the same parent + // Descendant: Node reachable by repeated proceeding from parent to child + // Ancestor: Node reachable by repeated proceeding from child to parent. + // Leaf: Node with no children + // Internal node: Node with at least one child + // External node: Node with no children -Structure code of a tree node +//Structure code of a tree node -In programming, trees are declared as follows: +//In programming, trees are declared as follows: struct node { From c8dec2ef25742fb27e8c7bfaf21911e9b5a50318 Mon Sep 17 00:00:00 2001 From: nitishji <40134429+nitishji@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:06:29 +0530 Subject: [PATCH 02/10] Update DFS_Graphs_using_adjacency_list --- DFS_Graphs_using_adjacency_list | 1 + 1 file changed, 1 insertion(+) diff --git a/DFS_Graphs_using_adjacency_list b/DFS_Graphs_using_adjacency_list index 11c62d3..abf54ef 100644 --- a/DFS_Graphs_using_adjacency_list +++ b/DFS_Graphs_using_adjacency_list @@ -1,4 +1,5 @@ //dfs of a graph complexity o(V+E) +//Algorithm #include using namespace std; //Adjacency list and visited list From 55e706e9039a21c1d6e4d6d94e874f41cbc8290a Mon Sep 17 00:00:00 2001 From: nitishji <40134429+nitishji@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:07:41 +0530 Subject: [PATCH 03/10] Update Island_Using_DFS.cpp --- Island_Using_DFS.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Island_Using_DFS.cpp b/Island_Using_DFS.cpp index 928b52c..aa1b6ba 100644 --- a/Island_Using_DFS.cpp +++ b/Island_Using_DFS.cpp @@ -1,3 +1,4 @@ +//Algorithm #include #include From c313991ed7ba58469ec83aea7c50f990b8011d33 Mon Sep 17 00:00:00 2001 From: nitishji <40134429+nitishji@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:09:02 +0530 Subject: [PATCH 04/10] Update Top 10 Algorithms and Data Structures for Competitive Programming --- ...0 Algorithms and Data Structures for Competitive Programming | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Top 10 Algorithms and Data Structures for Competitive Programming b/Top 10 Algorithms and Data Structures for Competitive Programming index 034eb47..e4ad0e8 100644 --- a/Top 10 Algorithms and Data Structures for Competitive Programming +++ b/Top 10 Algorithms and Data Structures for Competitive Programming @@ -1,4 +1,4 @@ - +IMP ALGO. Top 10 Algorithms and Data Structures for Competitive Programming In this post “Important top 10 algorithms and data structures for competitive coding “. From 1fbed29815a62640c12ed225905379d449a264a5 Mon Sep 17 00:00:00 2001 From: abhishek23feb <72147347+abhishek23feb@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:22:37 +0530 Subject: [PATCH 05/10] Update Tree_Traversal_levelorder.cpp --- Tree_Traversal_levelorder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Tree_Traversal_levelorder.cpp b/Tree_Traversal_levelorder.cpp index b1d3418..24add28 100644 --- a/Tree_Traversal_levelorder.cpp +++ b/Tree_Traversal_levelorder.cpp @@ -1,4 +1,5 @@ /* +Algorithm Time complexity : o(n) Space complexity : Best -> o(1) & Worst -> o(n) */ From 22078891477af1002ed7fcb1188980a1e0ce4f98 Mon Sep 17 00:00:00 2001 From: abhishek23feb <72147347+abhishek23feb@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:24:33 +0530 Subject: [PATCH 06/10] Update Tree_Traversal_levelorder.cpp --- Tree_Traversal_levelorder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tree_Traversal_levelorder.cpp b/Tree_Traversal_levelorder.cpp index 24add28..16a2c31 100644 --- a/Tree_Traversal_levelorder.cpp +++ b/Tree_Traversal_levelorder.cpp @@ -1,5 +1,5 @@ /* -Algorithm +Imp Algorithm Time complexity : o(n) Space complexity : Best -> o(1) & Worst -> o(n) */ From cbbf4e04898c53635f113babc024edacbdf8a2d0 Mon Sep 17 00:00:00 2001 From: abhishek23feb <72147347+abhishek23feb@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:25:26 +0530 Subject: [PATCH 07/10] Update Tree_DFS_Pre_Post_In_Order_Traversal.cpp --- Tree_DFS_Pre_Post_In_Order_Traversal.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Tree_DFS_Pre_Post_In_Order_Traversal.cpp b/Tree_DFS_Pre_Post_In_Order_Traversal.cpp index 7ee8e90..d0f6a44 100644 --- a/Tree_DFS_Pre_Post_In_Order_Traversal.cpp +++ b/Tree_DFS_Pre_Post_In_Order_Traversal.cpp @@ -1,4 +1,5 @@ /* +Algorithm Time complexity : o(n) Space complexity : Best,average case -> o(log(n)) & Worst -> o(n) */ From 9c1a76b1943b58ac25ef731ca7e26799479027cc Mon Sep 17 00:00:00 2001 From: abhishek23feb <72147347+abhishek23feb@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:26:21 +0530 Subject: [PATCH 08/10] Update Island_Using_DFS.cpp --- Island_Using_DFS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Island_Using_DFS.cpp b/Island_Using_DFS.cpp index aa1b6ba..78c9adc 100644 --- a/Island_Using_DFS.cpp +++ b/Island_Using_DFS.cpp @@ -1,4 +1,4 @@ -//Algorithm +//Imp Algorithm #include #include From 415eac2c1bb23e9e9e461f984f1d161ac8cdbc4e Mon Sep 17 00:00:00 2001 From: abhishek23feb <72147347+abhishek23feb@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:27:10 +0530 Subject: [PATCH 09/10] Update Top 10 Algorithms and Data Structures for Competitive Programming --- ...0 Algorithms and Data Structures for Competitive Programming | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Top 10 Algorithms and Data Structures for Competitive Programming b/Top 10 Algorithms and Data Structures for Competitive Programming index e4ad0e8..45424e2 100644 --- a/Top 10 Algorithms and Data Structures for Competitive Programming +++ b/Top 10 Algorithms and Data Structures for Competitive Programming @@ -1,4 +1,4 @@ -IMP ALGO. +IMP Algorithm Top 10 Algorithms and Data Structures for Competitive Programming In this post “Important top 10 algorithms and data structures for competitive coding “. From 1dace98c221a03df10d7fc4b2869da7efb0c0957 Mon Sep 17 00:00:00 2001 From: abhishek23feb <72147347+abhishek23feb@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:27:56 +0530 Subject: [PATCH 10/10] Update Tree_DFS_Pre_Post_In_Order_Traversal.cpp --- Tree_DFS_Pre_Post_In_Order_Traversal.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Tree_DFS_Pre_Post_In_Order_Traversal.cpp b/Tree_DFS_Pre_Post_In_Order_Traversal.cpp index 7ee8e90..d0f6a44 100644 --- a/Tree_DFS_Pre_Post_In_Order_Traversal.cpp +++ b/Tree_DFS_Pre_Post_In_Order_Traversal.cpp @@ -1,4 +1,5 @@ /* +Algorithm Time complexity : o(n) Space complexity : Best,average case -> o(log(n)) & Worst -> o(n) */