Pregunta de entrevista de IBM

i was asked an cache memory implementation problem and a rank and performance calculation based problem in hacker rank