Reverse a string in C using as little additional memory as possible
Problem Question: Reverse a string in C using as little additional memory as possible. Solution Answer: The first solution needs the size of a char and size of two integers, all of which will be allocated from the stack. This solution is the most commonly accepted “good” solution. Here is the code. Method 1 - Using 2 pointer technique We have already seen Reverse String Problem#Method 1 - Iterative in-place using Two Pointers ...