You are viewing a single comment's thread. Return to all comments →
my c# code like this:
public static string isValid(string s) { var temp = s.GroupBy(x=> x).GroupBy(x=> x.Count()); return temp.Where(x=> x.Count() == 1).Count() == 1 ? "YES" : "NO"; }
but it failed for test cases 3,5,14
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and the Valid String
You are viewing a single comment's thread. Return to all comments →
my c# code like this:
but it failed for test cases 3,5,14