Memory can be a substitute for thinking in one obvious way – you know (remember) the answer instead of having to think about it.
But this substitution can happen in more ways than the above.
Consider this problem – Today is a Sunday. Every Sunday, there is a conference call of your organisation. Suppose today you are told that you have to make a presentation one month from now. Then how many Sunday’s later is that resentation going to be?
You can think. Something like say – One month period is 4 weeks i.e. 4 ‘week-intervals’. So (it strikes you) that there should be 5 Sundays, from the beginning of the one month period, uptill the end of the one month period. So counting today as the first Sunday, the 5th Sunday (since that signals the end of the one month period from today) is the presentation Sunday. So (5-1) i.e. 4 Sundays later, is the presentation day.
Now, you could have avoided the thinking, by mechanically writing down on a paper, say, vertical line markings for a Sunday, one after another, and labelling every new line as an ordered Sunday (1st, 2nd etc.) and kept an eye on when 4 ‘week intervals’ (gaps between 2 consecutive vertical lines) get over. That Sunday (its ordered number) is the presentation day.
Here, in the second method, thinking has been substituted by something mechanical. But what have you done by writing all this on the paper? You have unloaded the burden off your memory – having to remember and keep track of where you are in the process – since you are “seeing the status” of things as you are bringing them to mind. So basically, you have used (nothing but) memory, by writing all that on the paper, that approach!
This is how memory has played an actual, literal substitute for thinking (in the guise of a mechanical, literal method of solving the problem).