Skip to content
Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:3888140

#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++)
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.