Swift Packages For LeetCode
Want to solve LC Medium or LC Hard in less time which require you to use complex data structure?
Problem : Swift does not provide heap, queue, stack and other complex DS as part of their framework.
Solution 1: Create your own DS as part of problem every time and use, but this would take a lot of time and would change focus from real problem.
Solution 2: Use apple provided package for collections that has Heap and other DS.
Leetcode by default support Collections, just import and use that’s all.
References: https://github.com/apple/swift-collections
Follow me Rahul Goel for further updates.