We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- String Construction
- Discussions
String Construction
String Construction
Sort by
recency
|
953 Discussions
|
Please Login in order to post a comment
C# public static int stringConstruction(string s) { var sarray = s.ToCharArray().ToHashSet(); var sarrayb = s.ToCharArray().ToHashSet();
sarray.IntersectWith(sarrayb); return sarray.Count; }
JavaScript / JS Solution - One Line
C++ (more at https://github.com/IhorVodko/Hackerrank_solutions/tree/master , feel free to give a star :) )
Java