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
Similar Kata:
Stats:
Created | Aug 22, 2015 |
Published | Aug 22, 2015 |
Warriors Trained | 5012 |
Total Skips | 358 |
Total Code Submissions | 10202 |
Total Times Completed | 3439 |
Java Completions | 1212 |
Python Completions | 1075 |
JavaScript Completions | 1013 |
Ruby Completions | 233 |
Total Stars | 56 |
% of votes with a positive feedback rating | 90% of 560 |
Total "Very Satisfied" Votes | 464 |
Total "Somewhat Satisfied" Votes | 82 |
Total "Not Satisfied" Votes | 14 |