All Questions
2 questions
1
vote
1
answer
858
views
Implementing `components(separatedBy:)` method in Swift
On looking at the components(separatedBy separator: String) -> [String] method from the Swift Standard Library, I tried to come up with an implementation just ...
4
votes
1
answer
2k
views
Swift - Finding longest binary gap of a given integer
I recently had the chance to try Codility's algorithm training, and the very first one in the list is finding the longest binary gap of a given integer.
I tried to implement this in Swift, and after ...