Skip to content

Commit af3a5f5

Browse files
Add problems which needs to be implemented
1 parent 5e1cb00 commit af3a5f5

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.pulkit.datastructures_algorithms.todo;
2+
3+
/*
4+
A binary search tree was created by traversing through an array from
5+
left to right and inserting each element. Given a binary search tree
6+
with distinct elements,print all possible arrays that could have led to this tree
7+
*/
8+
9+
public class BSTSequnces {
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.pulkit.datastructures_algorithms.todo;
2+
3+
/*
4+
Write an algorithm to find the "next" node (i.e., in-order successor)
5+
of a given node in a binary search tree.
6+
You may assume that each node has a link to its parent.
7+
*/
8+
9+
public class FindInorderSuccessorWithParentPointer {
10+
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.pulkit.datastructures_algorithms.todo;
2+
3+
/*
4+
You are implementing a binary tree class from scratch which, in addition to insert,
5+
find, and delete, has a method getRandomNode() which returns a random node from the tree.
6+
All nodes should be equally likely to be chosen. Design and implement an algorithm for
7+
getRandomNode, and explain how you would implement the rest of the methods.
8+
*/
9+
10+
public class getRandomNodeFromBinaryTree {
11+
}

0 commit comments

Comments
 (0)