You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-27
Original file line number
Diff line number
Diff line change
@@ -136,33 +136,22 @@ List of Programs related to data structures and algorithms
136
136
137
137
### Tree
138
138
139
-
1. Maximum depth of binary tree: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/1.maxDepthBinaryTree/maxDepthBinaryTree.js)
140
-
141
-
2. Same tree: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/sameTree.js)
142
-
143
-
3. Invert or Flip binary tree: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/invertTree.js)
144
-
145
-
4. Binary tree maximum path sum: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/maxPathSum.js)
146
-
147
-
5. Binary tree level order traversal: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/levelOrderTraversal.js)
148
-
149
-
6. Serialize and deserialize binary tree: [JavaScript](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/serializeDeserialize.js)
150
-
151
-
7. Subtree of another tree: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/subtree.js)
152
-
153
-
8. Construct binary tree from preorder and inorder traversal: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/buildTree.js)
10. Kth smalleest element in BST: [JavaScript](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/kthSmallestBST.js)
158
-
159
-
11. Lowest Common Ancestor of BST: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/lowestCommonAncestor.js)
13. Design and Search words Datastructure: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/wordDictionary.js)
164
-
165
-
14. Word search 2: [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/wordSearch2.js)
| 1 | Maximum depth of binary tree |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/1.maxDepthBinaryTree/maxDepthBinaryTree.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/1.maxDepthBinaryTree/maxDepthBinaryTree.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/1.maxDepthBinaryTree/maxDepthBinaryTree.js)| Easy | Depth First Search(DFS) with recursion |
142
+
| 2 | Same tree |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/2.sameTree/sameTree.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/2.sameTree/sameTree.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/2.sameTree/sameTree.md)| Easy | Depth First Search(DFS) with recursion |
143
+
| 3 | Invert or Flip binary tree | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/3.invertTree/invertTree.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/3.invertTree/invertTree.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/3.invertTree/invertTree.js) | Easy | Swapping nodes and Depth First Search(DFS) with recursion |
144
+
| 4 | Binary tree maximum path sum | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/4.maxPathSum/maxPathSum.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/4.maxPathSum/maxPathSum.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/4.maxPathSum/maxPathSum.md) | Hard | DFS using recursion |
145
+
| 5 | Binary tree level order traversal |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/5.levelOrderTraversal/levelOrderTraversal.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/5.levelOrderTraversal/levelOrderTraversal.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/5.levelOrderTraversal/levelOrderTraversal.js)| Easy | Depth First Search(DFS) with recursion |
146
+
| 6 | Serialize and deserialize binary tree |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/6.serializeDeserialize/serializeDeserialize.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/6.serializeDeserialize/serializeDeserialize.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/6.serializeDeserialize/serializeDeserialize.md)| Hard | DFS preorder traversal |
147
+
| 7 | Subtree of another tree |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/7.subtree/subtree.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/7.subtree/subtree.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/7.subtree/subtree.js)| Easy | Depth First Search(DFS) with recursion |
148
+
| 8 | Construct binary tree from preorder and inorder traversal |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/8.buildTree/buildTree.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/8.buildTree/buildTree.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/8.buildTree/buildTree.md)| Medium | DFS with recursion |
149
+
| 9 | Validate BST | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/9.validateBST/validateBST.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/9.validateBST/validateBST.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/9.validateBST/validateBST.js) | Medium | Depth-First-Search(DFS) using recursion |
150
+
| 10 | Kth smallest element in BST |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/10.kthSmallestBST/kthSmallestBST.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/10.kthSmallestBST/kthSmallestBST.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/10.kthSmallestBST/kthSmallestBST.js)| Medium | Iterative inorder traversal using stack |
151
+
| 11 | Lowest Common Ancestor of BST |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/11.lowestCommonAncestor/lowestCommonAncestor.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/11.lowestCommonAncestor/lowestCommonAncestor.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/11.lowestCommonAncestor/lowestCommonAncestor.md)| Medium | Iterative tree traversal |
152
+
| 12 | Trie |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/12.trie/trie.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/12.trie/trie.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/12.trie/trie.js)| Medium | Iteration over string characters |
153
+
| 13 | Design and Search words Datastructure |[Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/13.wordDictionary/wordDictionary.js)|[JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/13.wordDictionary/wordDictionary.js)|[Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/13.wordDictionary/wordDictionary.md)| Medium | Trie and DFS recursion |
154
+
| 14 | Word search 2 | [Source](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/14.wordSearch2/wordSearch2.js) | [JavaScript](https://livecodes.io/?console&x=https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/14.wordSearch2/wordSearch2.js) | [Documentation](https://github.com/sudheerj/datastructures-algorithms/blob/master/src/javascript/algorithms/tree/14.wordSearch2/wordSearch2.js) | Hard | Backtracking with Trie |
0 commit comments