Create string-reverse.cpp (#113)
* Create string_reverse.cpp * Update string_reverse.cpp * Rename string_reverse.cpp to string-reverse.cpp following the naming convention of the repository * docs: update string index readme add string-reversal in the string index readme Co-authored-by: Arsenic <54987647+Arsenic-ATG@users.noreply.github.com>pull/120/head
parent
29cbbeaf11
commit
3168e2f6c3
|
@ -7,6 +7,7 @@
|
|||
3. [KMP String Searching](c-or-cpp/kmp.cpp)
|
||||
4. [Rabin Karp String Searching](c-or-cpp/rabin-karp.cpp)
|
||||
5. [String Tokeniser](c-or-cpp/string-tokeniser.cpp)
|
||||
6. [String Reversal](c-or-cpp/string-reverse.cpp)
|
||||
|
||||
### C#
|
||||
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
#include <iostream>
|
||||
#include<string>
|
||||
#include<algorithm>
|
||||
using namespace std;
|
||||
int main() {
|
||||
string s;
|
||||
cin>>s;
|
||||
reverse(s.begin(),s.end());
|
||||
cout<<s;
|
||||
return 0;
|
||||
|
||||
}
|
Loading…
Reference in New Issue