/*Output Pattern found at index 0 Pattern found at index 9 Pattern found at index 13 */

## Optimal Binary Search Tree

/*Output Enter the number of elements:6 Enter the Element of 1:10 Enter the Element of 2:3 Enter the Element of 3:9 Enter the Element of 4:2 Enter the Element of 5:0 Enter the Element of 6:10 Enter the Probability of 0:5 Enter the Probability of 1:6 Enter the Probability of 2:4 Enter the Probability of…… Continue reading Optimal Binary Search Tree

## All Pair Shortest Path

/*OUTPUT: Enter the number of vertices: 3 Enter the number of edges: 5 Enter the end vertices of edge 1 with its weight 1 2 4 Enter the end vertices of edge 2 with its weight 1 3 11 Enter the end vertices of edge 3 with its weight 2 1 6 Enter the end…… Continue reading All Pair Shortest Path

## Robin-Karp String Matching

/*Output Pattern Naruto found in text: Naruto is the best !! Naruto Daisuki at index 0 Pattern Naruto found in text: Naruto is the best !! Naruto Daisuki at index 22 */

## N – Queens Problem

/*output Enter the number of queens: 4 1 -Q– —Q Q— –Q- 2 –Q- Q— —Q -Q– Total solution for N=4 –> 2 */

## Sum of Subsets

/*Output Enter number of elements 6 Enter elements 5 10 12 13 15 18 Enter sum to be computed 30 Subsets whose sum is are as follows Elements of set are 5 10 15 Elements of set are 5 12 13 Elements of set are 12 18 */

## First Fit Memory Allocation

/*Output Enter number of memory portions 6 Enter available memory portions 50 100 500 200 300 600 Enter number of processes 5 Enter processes 201 49 415 127 423 First fit 49 0 201 127 0 415 50 100 500 200 300 600 Sum 792 Total 1750 Percentage Utilization is 45.257141 */