7 kyu

Ordering the words!

1,212 of 3,439Parra_Inc

Description:

Description:

Given a string, you need to write a method that order every letter in this string in ascending order.

Also, you should validate that the given string is not empty or null. If so, the method should return:

"Invalid String!"

Notes

• the given string can be lowercase and uppercase.
• the string could include spaces or other special characters like '# ! or ,'. Sort them based on their ASCII codes

Examples

"hello world" => " dehllloorw"
"bobby"       => "bbboy"
""            => "Invalid String!"
"!Hi You!"    => " !!HYiou"

Good luck! Hope you enjoy it

Strings
Sorting
Fundamentals

Stats:

CreatedAug 22, 2015
PublishedAug 22, 2015
Warriors Trained5012
Total Skips358
Total Code Submissions10202
Total Times Completed3439
Java Completions1212
Python Completions1075
JavaScript Completions1013
Ruby Completions233
Total Stars56
% of votes with a positive feedback rating90% of 560
Total "Very Satisfied" Votes464
Total "Somewhat Satisfied" Votes82
Total "Not Satisfied" Votes14
Ad
Contributors
  • Parra_Inc Avatar
  • jhoffner Avatar
  • GiacomoSorbi Avatar
  • ChristianECooper Avatar
  • smile67 Avatar
  • Blind4Basics Avatar
  • FArekkusu Avatar
  • Just4FunCoder Avatar
  • farhanaditya Avatar
  • saudiGuy Avatar
Ad