Suggested approach: Swift provides automatic tuple comparison ever since Swift 2.2 – you can just use
== to compare tuples item by item.
For bonus points you could mention that tuple comparison does not guarantee that both tuples use the same element names.
Estimated difficulty: Easy
See the full list of iOS interview questions
targetEnvironment()compiler condition do?
Link copied to your pasteboard.