Find the least recently used pages that is present in the set
int lru = INT_MAX , val ; for ( auto it = s . begin ( ) ; it != s . end ( ) ; it ++ ) { if ( indexes [ * it ] < lru ) { lru = indexes [ * it ] ; val = * it ; } }