Cody

Problem 45245. String count

Solution 3347458

Submitted on 23 Oct 2020 by Dyuman Joshi
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
str= 'He IS the witcher!! 1233 */-, ain"t hE?'; y_correct = [20,4,7,4,16,8]; assert(isequal(str_calc(str),y_correct))

2   Pass
str= 'Love what u do!! # do what U love '; y_correct = [22,0,9,2,20,3]; assert(isequal(str_calc(str),y_correct))

3   Pass
str= '23450011243;;[]{}***63``'; y_correct = [0,13,0,0,0,9]; assert(isequal(str_calc(str),y_correct))

Suggested Problems

More from this Author149

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!