It is to use the previously calculated result to avoid repeated calculations of the same subtask which helps in reducing the time complexity. |
Pattern Searching
They are sometimes also referred to as string searching algorithms and are considered as a part of the string algorithms. These algorithms are useful in the case of searching a string within another string. |
Stupid is as stupid does. — Forrest Gump |