Abbreviate the given string. Consider Only Capital Letters.
EXAMPLE
If input is 'Abbreviation of The Given String' then output should be 'A T G S '. Note: There should be a space at the end of the abbreviated word.
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers142
Suggested Problems
-
The Hitchhiker's Guide to MATLAB
3415 Solvers
-
631 Solvers
-
Solve the set of simultaneous linear equations
505 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
400 Solvers
-
Write a function man that takes a row vector v and returns a matrix H as follows..
651 Solvers
More from this Author16
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
In the swecond test case, you have:
x ='The Propose is to Make ABBREBIATION';
y_correct = 'T P M A ';
Are "is" and "to" to be ignored, or should the rule be "Only abbreviate words that begin with capital letters?"
In this problem it is assumed that every word in the input string with more than two letters starts with an uppercase letter. All the test cases in the examples have this convention.
I hate regexes because I cannot handle them :-)