Skip to content

anonymous /gist:3888140
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
#include <iostream>
#include <string>
#include <deque>
using namespace std;
int main()
{
const string str = "Hello world";
const int len = str.length();
string s = "";
deque<char> temp;
for (int i = 0; i < len; i++)
temp.push_front(str[i]);
for (int i = 0; i < len; i++)
s += temp[i];
cout << "Original: " << str << endl;
cout << "Reversed: " << s << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.