/leetcode-swift

LeetCode in Swift

Primary LanguageSwift

LeetCode Swift

這個 Repo 用來記錄我使用 swift 在 LeetCode 解題的過程,包含解題中遇到的錯誤,也包含解出 AC 的答案,以下清單將連結到我對題目的中文翻譯與解題的過程。歡迎參考 :)

Number Title 解題紀錄 原始碼
#1 Two Sum Link Link
#9 Palindrome Number Link Link
#13 Roman to Integer Link Link
#21 Merge Two Sorted Lists Link Link
#26 Remove Duplicates from Sorted Array Link Link
#27 Remove Element Link Link
#35 Search Insert Position Link Link
#38 Count and Say Link Link
#53 Maximum Subarray Link Link
#66 Plus One Link Link
#70 Climbing Stairs Link Link
#83 Remove Duplicates from Sorted List Link Link
#100 Same Tree Link Link
#101 Symmetric Tree Link Link
#104 Maximum Depth of Binary Tree Link Link
#107 Binary Tree Level Order Traversal II Link Link
#108 Convert Sorted Array to Binary Search Tree Link Link
#110 Balanced Binary Tree Link Link
#112 Path Sum Link Link
#118 Pascal's Triangle Link Link
#119 Pascal's Triangle II Link Link
#121 Best Time to Buy and Sell Stock Link Link
#122 Best Time to Buy and Sell Stock II Link Link
#136 Single Number Link Link
#167 Two Sum II - Input array is sorted Link Link
#169 Majority Element Link Link
#171 Excel Sheet Column Number Link Link
#172 Factorial Trailing Zeroes Link Link
#175 Combine Two Tables Link Link
#181 Employees Earning More Than Their Managers Link Link
#182 Duplicate Emails Link Link
#198 House Robber Link Link
#202 Happy Number Link Link
#205 Isomorphic Strings Link Link
#206 Reverse Linked List Link Link
#217 Contains Duplicate Link Link
#226 Invert Binary Tree Link Link
#231 Power of Two Link Link
#242 Valid Anagram Link Link
#257 Binary Tree Paths Link Link
#258 Add Digits Link Link
#263 Ugly Number Link Link
#268 Missing Number Link Link
#283 Move Zeroes Link Link
#292 Nim Game Link Link
#326 Power of Three Link Link
#342 Power of Four Link Link
#344 Reverse String Link Link
#345 Reverse Vowels of a String Link Link
#349 Intersection of Two Arrays Link Link
#350 Intersection of Two Arrays II Link Link
#367 Valid Perfect Square Link Link
#371 Sum of Two Integers Link Link
#383 Ransom Note Link Link
#387 First Unique Character in a String Link Link
#389 Find the Difference Link Link
#401 Binary Watch Link Link
#404 Sum of Left Leaves Link Link
#405 Convert a Number to Hexadecimal Link Link
#409 Longest Palindrome Link Link
#412 Fizz Buzz Link Link
#415 Add Strings Link Link
#434 Number of Segments in a String Link Link
#437 Path Sum III Link Link
#441 Arranging Coins Link Link
#447 Number of Boomerangs Link Link
#448 Find All Numbers Disappeared in an Array Link Link
#453 Minimum Moves to Equal Array Elements Link Link
#455 Assign Cookies Link Link
#458 Poor Pigs Link Link
#459 Repeated Substring Pattern Link Link
#461 Hamming distance Link Link
#463 Island Perimeter Link Link
#476 Number Complement Link Link
#485 Max Consecutive Ones Link Link
#492 Construct the Rectangle Link Link
#496 Next Greater Element I Link Link
#500 Keyboard Row Link Link
#501 Find Mode in Binary Search Tree Link Link
#504 Base 7 Link Link
#506 Relative Ranks Link Link
#520 Detect Capital Link Link
#521 Longest Uncommon Subsequence I Link Link
#530 Minimum Absolute Difference in BST Link Link
#538 Convert BST to Greater Tree Link Link
#541 Reverse String II Link Link
#543 Diameter of Binary Tree Link Link
#551 Student Attendance Record I Link Link
#557 Reverse Words in a String III Link Link
#561 Array Partition I Link Link
#563 Binary Tree Tilt Link Link
#566 Reshape the Matrix Link Link
#572 Subtree of Another Tree Link Link
#575 Distribute Candies Link Link
#594 Longest Harmonious Subsequence Link Link
#595 Big Countries Link Link
#598 Range Addition II Link Link
#599 Minimum Index Sum of Two Lists Link Link
#606 Construct String from Binary Tree Link Link
#617 Merge Two Binary Trees Link Link
#620 Not Boring Movies Link Link
#627 Swap Salary Link Link
#628 Maximum Product of Three Numbers Link Link
#637 Average of Levels in Binary Tree Link Link
#643 Maximum Average Subarray I Link Link
#645 Set Mismatch Link Link
#653 Two Sum IV - Input is a BST Link Link
#657 Judge Route Circle Link Link
#661 Image Smoother Link Link
#671 Second Minimum Node In a Binary Tree Link Link