Dynamic Memory Allocation

If in a problem I am exceeding the space limit, can I use dynamic memory allocation to solve that problem?

Hello @tanyaa.sood,

Not always.
But it might help in some cases as Dynamic memory allocation is a way for running programs to request memory from the operating system when needed. This memory does not come from the program’s limited stack memory – instead, it is allocated from a much larger pool of memory managed by the operating system called the heap . On modern machines, the heap can be gigabytes in size.

Hope, this would help.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.