Algorithms & Data Structures implemented in Swift X (X = 4.2).
Hello!
Algorithms is the soul of programs. But I am a green hand in this field. Now I am trying to learn them well, to open my mind in thinking how to write elegant code.
If my code did help you, would you please give me a Star π? It will courage me to move on! Thank you!
No doubt that I would made some mistakes in it, if you find some bugs, please issue me. I am looking forward to discuss with you about the magic of Swift! Thank you!
-
Sort
-
Search
-
Data Structure
-
LeetCode
- 001 Two Sum
- 007 Reverse Integer
- 009 Palindrome Number
- 014 Longest Common Prefix
- 020 Valid Parentheses
- 021 Merge Two Sorted Lists
- 026 Remove Duplicates from Sorted Array
- 027 Remove Element
- 028 Implement strStr()
- 035 Search Insert Position
- 038 Count and Say
- 053 Maximum Subarray
- 058 Length of Last Word
- 066 Plus One
- 067 Add Binary
- 069 Sqrt(x)
- 070 Climbing Stairs
- 083 Remove Duplicates from Sorted List
- 088 Merge Sorted Array
- 100 Same Tree
- 101 Symmetric Tree
- 104 Maximum Depth of Binary Tree
- 107 Binary Tree Level Order Traversal II
- 108 Convert Sorted Array to Binary Search Tree
Swift is a new-born programming language which update continuously. It has a lot of new features and grammar changes between different versions before its ABI is stable.
Currently, the newest version of Swift is 4.2 (with Xcode 10).
So I try to use X to represent the newest version of Swift and adapt to the newest Xcode.
- Algorithms & Data Structures in C++ (zh-CN)
- Algorithms, Part I
- Algorithms (4th Edition)
- raywenderlich/swift-algorithm-club
- MIT