top of page
Search
Binary Tree to Binary Search Tree Conversion
Following is a 3 step solution for converting Binary tree to Binary Search Tree. 1) Create a temp array arr[] that stores inorder...

Abhinaw Tripathi
Jun 2, 20162 min read
5 views
0 comments
Find k-th smallest element in BST (Order Statistics in BST)
Solution Approach: By using In order traversal of BST retrieves elements of tree in the sorted order. The in order traversal uses stack...

Abhinaw Tripathi
Jun 2, 20161 min read
5 views
0 comments
Total number of possible Binary Search Trees with n keys?
Solution Approach: Before going deeper,we should know about Catlan Number. Here it is: Total number of possible Binary Search Trees...

Abhinaw Tripathi
Jun 2, 20161 min read
2 views
0 comments
How to check if a Binary Tree is BST or not?
What is Binary Search Tree(BST)? A binary search tree (BST) is a node based binary tree data structure. Must have these Properties: ...

Abhinaw Tripathi
Jun 2, 20161 min read
4 views
0 comments
To check if a binary tree is balanced.For this,a balanced tree is defined to be a tree such that the
Solution Approach: Point to be noted here is two sub tree differ in height by no more than one.So we can simply recurs through the...

Abhinaw Tripathi
Jun 2, 20161 min read
3 views
0 comments
How to check a Linked-List is a Palindrome.
Solution Approach: First thing is we should know about palindrome. What is Palindrome? The list must be the same backwards and...

Abhinaw Tripathi
Jun 2, 20161 min read
2 views
0 comments
Given a circular linked list,implement an algorithm which returns the node at the beginning of the l
Solution Approach: Create two pointers ,Fast Pointer and Slow Pointer. Move Fast Pointer at a rate of 2 and slow pointer at rate of 1....

Abhinaw Tripathi
Jun 2, 20161 min read
2 views
0 comments
Flyweight Design Pattern
Flyweight reduces the cost of creating and manipulating a large number of similar objects.Flyweight is used when there is a need to...

Abhinaw Tripathi
Jun 1, 20161 min read
5 views
0 comments
Proxy Design Pattern
What is Proxy Design Pattern? First of all its a structural pattern and Proxy means in place of.In our collage times we gave proxy in...

Abhinaw Tripathi
Jun 1, 20162 min read
3 views
0 comments
Facade Design Pattern
What is Facade Design Pattern? Facade is a structural Design Pattern and In java the interface JDBC is an example of facade pattern.we as...

Abhinaw Tripathi
May 31, 20161 min read
12 views
0 comments
Decorator Pattern
What is Decorator Patter? It changes(extends or modify) the behavior of an instance at run time. When to use Decorator Pattern: We can...

Abhinaw Tripathi
May 31, 20161 min read
2 views
0 comments
Design Pattern - Composite Design Pattern
What is Composite Design Pattern? A composite pattern is a collection of objects and they may be either a composite or just a primitive...

Abhinaw Tripathi
May 31, 20161 min read
3 views
0 comments
Design Pattern - Bridge Design Pattern
What is Bridge Design Pattern? Bridge DP is Structural Pattern.Bridge pattern is used to separate out the interface from its...

Abhinaw Tripathi
May 31, 20161 min read
2 views
0 comments
Strategy Design Pattern tutorial example
What is Strategy Design Pattern? Strategy pattern is used when we want different algorithms needs to be applied on objects.This...

Abhinaw Tripathi
May 27, 20161 min read
1 view
0 comments
Design Pattern - Sate Design Pattern
What is State Design Pattern? The sate design pattern is a behavioral object design pattern.The idea behind the state patterns is to...

Abhinaw Tripathi
May 27, 20161 min read
1 view
0 comments
Design Pattern - Observer Pattern
What is Observer Pattern? Yes, Observer Pattern is Behavioral Design Pattern.In the Observer pattern ,an object called subject...

Abhinaw Tripathi
May 27, 20162 min read
3 views
0 comments
Design Pattern - Behavioral Design Patterns
What is Behavioral Design Pattern? Behavioral patterns are those pattern which are specifically concerned with communication between...

Abhinaw Tripathi
May 27, 20161 min read
1 view
0 comments
Design Pattern - Adapter Design Pattern
What is Adapter Pattern? Of-curse,a structural design pattern which converts the existing interfaces to a new interface to achieve ...

Abhinaw Tripathi
May 27, 20162 min read
9 views
0 comments
Android with RecyclerView Example
RecyclerView is more advanced and flexible and efficient version of ListView. RecyclerView ViewGroup is an container for larger data set...

Abhinaw Tripathi
May 27, 20163 min read
7 views
0 comments
Arc GIS Mapping Example with Source code
1)ArcGisActivity.java package arc.gis; import android.app.Activity; import android.content.Context; import android.graphics.Color; ...

Abhinaw Tripathi
May 26, 20164 min read
3 views
0 comments
bottom of page