Question: Which of following is true about the reverse _ string function used in solving the problem of reversing a string? string reverse _ substring (
Which of following is true about the reversestring function used in solving the problem of reversing a string?
string reversesubstringstring str int start, int end
if start end
return str;
char ch strstart;
strstart strend;
strend ch;
return reversesubstringstr start end ;
string reversestringstring str
return reversesubstringstr strlength;
Question options:
The reversestring function is a recursive function.
The reversestring function is an iterative function.
The reversestring function uses reversesubstring as a helper function.
The reversesubstring function uses reversestring as a helper function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
