Write a program to implement LRU page replacement algorithm using C++



Enter number of frames: 3

Enter 20 pages: 7 0 1 2 0 3 0 4 2 3 0 3 2 1 2 0 1 7 0 1

Number of Page Faults 12
Number of page hits 8

Program Code (LRU Page replacement algorithm):



Output :