Evaluating memory use
Usually, there are many possible solutions to the same problem, and one of the crucial differences between them is their requirement
for operational memory. The least demanding computations are those performed without using any arrays or allocating dynamic data structures,
which means that the memory requirement is independent of the data size. More demanding algorithms may require, for example, memory space
proportional to the size of input data.
For example, if we would want to treat 100MB of data all at a time, we would need 100MB of memory
for the program to operate. Sometimes, large memory requirements are a feature of the problem and it is impossible to optimize this aspect
of the program, but quite often different solutions exist, and we can apply an approach or algorithm which is inherently more economical in terms
of memory use. By setting up memory limits for a challenge, you can eliminate inefficient solutions, at the same time allowing only the
efficient ones with reasonable memory use. Carefully selected input data can also be used to differentiate the score, allowing memory-heavy
solutions to pass only a part of the tests. Thanks to this approach, you will be able to see the difference between entirely incorrect
solutions, and the correct, but memory-inefficient ones.