Skip to content

Commit a179545

Browse files
authored
reverse-string: fix approach typo (#942)
1 parent cfa0c5e commit a179545

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exercises/practice/reverse-string/.approaches/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ std::string reverse_string(std::string_view original)
169169
std::string result;
170170
171171
// pass it to the recursive helper function
172-
helper(original, result);
172+
recursive_helper(original, result);
173173
174174
// result now contains a reversed version of the string
175175
return result;

exercises/practice/reverse-string/.approaches/linear-recursion/content.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void recursive_helper(std::string_view input, std::string& output)
4242
std::string reverse_string(std::string_view original)
4343
{
4444
std::string result;
45-
helper(original, result);
45+
recursive_helper(original, result);
4646
return result;
4747
}
4848

0 commit comments

Comments
 (0)