Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
1 Implementing a preorder visit for a Binary Tree
Solution
Code
Complexity
2 Computing the diameter of a binary tree
Solution
Code
Complexity
3 Implementing an in-order visit for a Binary Tree
Solution
Code
Complexity
4 Implementing a post-order visit for a Binary Tree
Solution
Code
Complexity
5 Implementing a level order visit for a Binary Tree
Solution
Code
Complexity
6 Counting the number of leaves in a tree
Solution
Code
Complexity
7 Checking if two binary trees are structurally identical
Solution
Code
}
Complexity
8 Printing all the paths in a binary tree
Solution
Code
Complexity
9 Verifying if a path sum is equal to an integer
Solution
Code
Complexity
10 Find the maximum path sum between two leaves of a binary tree
Solution
Code
Complexity
11 Reconstructing a tree given its pre-order and in-order traversals
Solution
Code
Complexity
12 Printing a zig-zag traversal
Solution
Code
Complexity
13 Printing the lowest common ancestor (LCA)
Solution
Code
Complexity
14 Implementing “find” and “insert” in a Binary Search Tree
Solution
Code
Complexity
15 Print a BST in order
Solution
Code
Complexity
16 Implementing findMin and findMax in a BST
Solution
Code
Complexity
17 Implementing deleteNode in a BST
Solution
Code
Complexity
18 Implementing the lowest common ancestor in a BST
Solution
Code
Complexity
19 Checking if a tree is a BST
Solution
Code
Complexity
20 Converting a Double linked list into a BST
Solution
Code
Complexity
21 Converting a BST into a Double Linked List
Solution
Code
Complexity
22 Finding the k-th element in a BST
Solution
Code
Complexity
23 Printing all the keys in a BST within a given interval
Solution
Code
Complexity
24 Merging Two Balanced Binary Search Trees
Solution
Code
Complexity
25 Finding out if there is a triplet in a Balanced BST that adds to zero
Solution
Code
Complexity
26 Implementing a B-Tree
Solution
Code
Complexity
27 Implementing a Skiplist
Solution
Code
Complexity
28 Implementing Tries
Solution
Code
29 Implementing a segment tree
Solution
Code
Complexity
30 Implementing Range minimum queries
Solution
Code
Complexity
31 Implementing a suffix tree
Solution
Code
Complexity
[1]
[1]
← Prev
Back
Next →
← Prev
Back
Next →