How will you implement sets and the intersection operation? Complexity?
Answer / Vikas Kumar Tyagi
In Swift, sets are implemented using `Set` data type. To find the intersection of two sets, you can simply use the `intersection(_:)` method.nComplexity: Adding an element to a set takes O(1) time, while finding the intersection takes O(min(n, m)) time, where n and m are the number of elements in both sets.
| Is This Answer Correct ? | 0 Yes | 0 No |
Explain about Viewcontroller lifecycle.
How would you create your own custom view in iOS operating system?
1 Answers TryTechnicals Pvt Ltd,
What is nsuserdefaults?
Can you please explain the difference between nsarray and nsmutablearray?
What is the difference between retain & assign in iOS operating system?
What is nsmanagedobjectmodel?
What is a delegate xcode?
How are non-atomic and atomic properties different? Which one is the default property for synthesized properties?
What is mvvm in ios swift?
What is main thread checker?
What is @implementation?
Flow of push notification?