// return a string with all occurrences of substr in str replaced with replacement
std::string replace_all( const std::string& str, const std::string& substr,
const std::string& replacement ) ;
This function can be called with many different input sets (each set being a tuple of three strings). A specific invocation of the function with a given input set is an instance. To analyuse its time and space complexity, we need to consider what happens as the size of data increases - what are the characteristics of the input data set which will affect performance? An instance characteristic is a (typically numeric) measure of the proiperties of the input data that has a bearing on performance.
In the above example, the instance characteristics would be N - the length of str K - the length of substr L - the length of replacement
We would aim to estimate performance of the function as time(N,K,L) or space(N,K,L)