LeetCode-Swift
LeetCode-Swift copied to clipboard
Solutions to LeetCode by Swift
Fix #301
1. Empty Case handling 2. Better naming
Earlier code was not compiled 1. Updated for latest swift language feature. 2. Using better naming
* 754. Reach a Number, with O(logn) & O(1) * 1345. Jump Game IV, with O(n) & O(n) * 1457. Pseudo-Palindromic Paths in a Binary Tree, with O(n) & O(n)
LeetCode-Swift/Array/RemoveDuplicatesFromSortedArray.swift The solution to the above problem doesn't seems to be correct. e.g Input: [1,1,2,2,5,5,6,8,9,9,9] Program output in Leetcode console: [1,2,5,6,8,9] Program Output in Xcode Playground : [1, 2, 5,...
Hi there, Can u give a bit explanation of the following lines: ``` for i in 0..
The space complexity was specified as O(1) in the [solution](https://github.com/soapyigu/LeetCode-Swift/blob/master/Tree/MaximumDepthOfBinaryTree.swift), however because of recursion, considering the stack, should it be O(n) instead?
Added c++ code of Word ladder.
The answer for **Add Strings** links to incorrect question: https://leetcode.com/problems/length-of-last-word/ **Add Strings:** **Linked to:**
`isAlphanumeric` should change with `isValid`