-
Sorting array of strings (or words) using Trie
```java class TrieNode { TrieNode[] children = new TrieNode[26];
-
Reverse Level Order Traversal
```java void reverseLevelOrder(Node node) { Stack
S = new Stack(); Queue Q = new LinkedList(); Q.add(node); -
Lowest Common Ancestor in a Binary Tree (Using Parent Pointer)
```java Node LCA(Node n1, Node n2) { int d1 = depth(n1), d2 = depth(n2); int diff = d1 - d2;
-
Lowest Common Ancestor in a Binary Search Tree.
```cpp node lca(struct node root, int n1, int n2) { while (root != NULL) { if (root->data > n1 && root->data > n2) root = root->left;
-
Lowest Common Ancestor in a Binary Tree
```java Node findLCA(Node node, int n1, int n2) { if (node == null) return null;
-
Level Order Tree Traversal
```java class Node { int data; Node left, right;
-
Iterative Preorder Traversal
```java void iterativePreorder(Node node) {
-
Iterative Method to find Height of Binary Tree
```java int treeHeight(Node node) { if (node == null) return 0;
-
Iterative function to check if two trees are identical
```java boolean areIdentical(Node root1, Node root2) { if (root1 == null && root2 == null) return true;
-
Inorder Tree Traversal without Recursion
```java void inorder(Node root) { if (root == null) return;