Toggle navigation
New
Learn
Snippets
Meta
News
About
API Docs
Source Code
Account
Register
Login
ReverseString
ReverseString.cpp
dio.cpp
✖
tria.cpp
✖
tessera.cpp
✖
pente.cpp
✖
eksi.cpp
✖
Run Settings
Language
C++
Language Version
latest
Run Command
Snippet Metadata
Owner
toddelon
Created
Modified
Visibility
Public
#include <iostream> using namespace std; class Solution { public: string reverseString(string s) { int size = s.size() ; int i; for ( i=0 ; i<(size/2);i++) swap(s[i],s[size-i-1]); return s; } }; int main(){ Solution sol; string s= sol.reverseString("Hello"); cout<<s; return 0; }
Editor Settings
Theme
Chrome
Clouds
Crimson Editor
Dawn
Dreamweaver
Eclipse
GitHub
Solarized Light
TextMate
Tomorrow
XCode
Kuroir
KatzenMilch
Ambiance
Chaos
Clouds Midnight
Cobalt
idle Fingers
krTheme
Merbivore
Merbivore Soft
Mono Industrial
Monokai
Pastel on dark
Solarized Dark
Terminal
Tomorrow Night
Tomorrow Night Blue
Tomorrow Night Bright
Tomorrow Night 80s
Twilight
Vibrant Ink
Key bindings
Default
Vim
Emacs
Full width
True
False
Lines
-
Auto
+
Direct link
Raw
Embed