Count number of binary search tree created for array of size n

Count number of binary search tree created for array of size n

Output:

package linkedlist;

public class CountNumberOfBST_Catalan {
static int value = 0;

public static void main(String[] args) {

int totalBST = numberOfBST(5);
System.out.println(“The total BST is “+totalBST);
}

private static int numberOfBST(int n) {
int T[] = new int[n+1];
T[0] = 1;
T[1] = 1;
for(int i=2; i <= n; i++){ for(int j=0; j

Write a function to get the intersection point of two Linked Lists.

There are two singly linked lists in a system. By some programming error the end node of one of the linked list got linked into the second list, forming a inverted Y shaped list. Write a program to get the point where two linked list merge.

Output:

The node of intersection is 15

Find out if an anagram of a string is subString of another String

Today we find the if an string given (anagram) is a sub-String of another string or not.

Output:
Anagram of ozma is substring of amazon