title: Swift set contains complexity
body: <p>Set has contains function which returns true if member exists in the set; otherwise, false.</p>
  
  <p>and its complexity is O(1).</p>
  
  <p>I want to know how its complexity is constant O(1) i.e. it does not depends on size</p>
  
  <p>Here are the docs : <a href="https://developer.apple.com/documentation/swift/set/1540013-contains" rel="nofollow noreferrer">https://developer.apple.com/documentation/swift/set/1540013-contains</a></p>