โ† SAP questions
CodingMedium

Count page faults in LRU cache management

Filed under SAP

Given a reference string of page numbers and a fixed cache capacity, simulate an LRU (Least Recently Used) page replacement algorithm and return the total number of page faults.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related SAP questions

Collected from public candidate posts and coding forums. Updated Nov 2026.