You are viewing a single comment's thread. Return to all comments →
in C#
public static int camelcase(string s) { List<string> totalwords = new List<string>(); string _singleword =""; for(int i=0; i < s.Length; i++){ if(!char.IsUpper(s[i])){ _singleword += s[i]; } else { totalwords.Add(_singleword); _singleword = ""; _singleword += s[i]; } } return totalwords.Count+1; }
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
CamelCase
You are viewing a single comment's thread. Return to all comments →
in C#