Reverse the array - 450DSA Cracker Solution
Reverse a String
Given a String S , print the reverse of the string as output.
class Solution {
public:
string revStr(string S) {
for(int i = 0, j= S.length()-1; i<j ;i++,j--)
{
swap(S[i], S[j]);
}
re...
keycomputereducation.hashnode.dev4 min read