diff --git a/Lecture034 Recursion Day4/reverseString.cpp b/Lecture034 Recursion Day4/reverseString.cpp index 18211037..b49ac810 100644 --- a/Lecture034 Recursion Day4/reverseString.cpp +++ b/Lecture034 Recursion Day4/reverseString.cpp @@ -6,7 +6,7 @@ void reverse(string& str, int i, int j ) { cout << "call recieved for " << str << endl; //base case - if(i>j) + if(i>=j) return ; swap(str[i], str[j]); @@ -27,4 +27,4 @@ int main() { cout << name << endl; return 0; -} \ No newline at end of file +}