fork download
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <string>
  4.  
  5. std::string alpha(std::string s)
  6. {
  7. std::sort(s.begin(), s.end());
  8. return s;
  9. }
  10.  
  11. int main()
  12. {
  13. std::cout << alpha("qwertyuiopasdfghjklmzxcvbn") << std::endl;
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 3432KB
stdin
Standard input is empty
stdout
abcdefghijklmnopqrstuvwxyz