Answer the question
In order to leave comments, you need to log in
How does memory allocation work?
Hello, how can I understand the task that the program should allocate one O (1) memory unit. They were given the task of writing a program to detect a palindrome, with this condition
Answer the question
In order to leave comments, you need to log in
It is allowed to allocate memory for a certain number of variables, which does not depend on the length of the string. This is a fancy way to prevent you from making a copy of the string, flipping it over and comparing it to the original.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question