GE interview question

Coding: Reverse a string and remove duplicates

Interview Answer

Anonymous

3 Sept 2017

C++ Version: #include #include using namespace std; void reverseString(string&); // pass by reference to change the actual variable int main() { string x = "This string will be reversed"; cout = 0; --i) { temp = temp + x[i]; } x = temp; }