memory is an essential cognitive function that allows us to process and retain information. there…