/*Output Memory Management Scheme – Best Fit Enter the number of blocks:6 Enter the number of processes:5 Enter the size of the blocks:- Block no.1:50 Block no.2:100 Block no.3:500 Block no.4:200 Block no.5:300 Block no.6:600 Enter the size of the processes :- Process no.1:201 Process no.2:49 Process no.3:415 Process no.4:127 Process no.5:423 Process_no Process_size Block_no…… Continue reading Best Fit Memory Allocation

## Optimal Page Replacement

/*Output Enter number of frames: 3 Enter number of pages: 10 Enter page reference string: 2 3 4 2 1 3 7 5 4 3 2 -1 -1 2 3 -1 2 3 4 2 3 4 1 3 4 1 3 4 7 3 4 5 3 4 5 3 4 5 3 4…… Continue reading Optimal Page Replacement

## Naive Pattern Searching

/*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 */