DEV Community

k@k
k@k

Posted on

What is memoization and what’s the use it?

memoization is a process of building a function that is capable of remembering it’s previously computed results or values.

The use of making a memoization function is that we avoid the computation of that function if it was already performed in the last calculations with the same arguments.

This saves time but has a downside that we will consume more memory for saving the previous results.

Happy Learning! 😇

Discussion (0)