Add a boolean attribute to the problem class which will determine if the input-output pairs should be memoised for that problem or not. This is especially useful if the problem logic is computationally expensive. Memoised data can be stored and fetched from a map data structure. Precaution to be taken for concurrent access by multiple threads to this data.
Add a boolean attribute to the problem class which will determine if the input-output pairs should be memoised for that problem or not. This is especially useful if the problem logic is computationally expensive. Memoised data can be stored and fetched from a map data structure. Precaution to be taken for concurrent access by multiple threads to this data.