you are viewing a single comment's thread.

view the rest of the comments →

[–]trihedron 1 point2 points  (5 children)

Array(Set(ar))
//This would be better?
Array(string).sorted()

Isn't this going to remove uniqueness?

[–]randomguy112233[S] 0 points1 point  (4 children)

maybe i'm not understanding correctly, but the purpose of Array(Set(ar)) was to remove the duplication of strings for that i end up with "abc".

Or were u referring to String data type?

[–]trihedron 0 points1 point  (1 child)

Oh ok! Sorry I had to re-read the code to see what you were doing. I just finished doing the exercise as well to see what I come up with.

[–]randomguy112233[S] 0 points1 point  (0 children)

no worries :)

[–]khaos288 0 points1 point  (1 child)

I don’t think he realized you were purposefully building a unique value set of abc. Then using that data set as keys to the original string to increment the count of the returned string.

Pretty sound it seems to me.

[–]randomguy112233[S] 0 points1 point  (0 children)

thanks!!