Sets Vs Arrays


When to use sets instead of arrays 

  • setting it fast, get it fast: O(1)
  • comparing data sets
  • A set is an unordered pool of unique objects.
  • you can't have more than one copy of a value in the set.


read more here...

https://www.swiftbysundell.com/posts/the-power-of-sets-in-swift

#xcode #swift 

要查看或添加评论,请登录

社区洞察

其他会员也浏览了