You are viewing a single comment's thread. Return to all comments →
it works fine for me
int n=s.size(); int jump=sqrt(n); if(jump*jump!=n){ jump++; } string ans=""; for(int i=0;i<jump;i++){ for(int j=i;j<n;j+=jump){ ans+=s[j]; } ans+=" "; } return ans;
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all comments →
it works fine for me