0

Problem: Need to get count of repeated values in array and put it in tuple Something like this:

var array = ["a","a","b","a","c","b"]
answer = ["a":3,"b":2,"c":1]
DmitrievichR
  • 119
  • 1
  • 11
  • @Hamish oh sorry I did not notice – DmitrievichR Nov 15 '16 at 16:29
  • the answers in that question are kinda poor. NSCountedSet is probably the best way to go about it – Alexander Nov 15 '16 at 17:12
  • 1
    @AlexanderMomchliov There's [one answer](http://stackoverflow.com/a/30545658/2227743) with NSCountedSet but it's in Objective-C. You could post a Swift version over there if you want. :) But I don't think *this* page should be repopened as it's a clear duplicate. – Eric Aya Nov 15 '16 at 17:56

0 Answers0