An open API service indexing awesome lists of open source software.

https://github.com/summerhf/leetcode-exercise

Algorithm Exercise Recording
https://github.com/summerhf/leetcode-exercise

leetcode-questions leetcode-solutions leetcode-swift

Last synced: 4 months ago
JSON representation

Algorithm Exercise Recording

Awesome Lists containing this project

README

        

# LeetCode-Exercise

> Algorithm Exercise Recording

# 1. Array

Title | Solution | Difficulty | Time | Space | Ideas Of Solving Problem
---|---|---|---|---|----|
[1.Sort Array By Parity](https://leetcode.com/problems/sort-array-by-parity/)| [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/SortArrByParity.playground/Contents.swift) | Easy | O(n) | O(1) |
[2.Max Consecutive Ones](https://leetcode.com/problems/max-consecutive-ones/)| [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/MaxConsecutive.playground/Contents.swift)| Easy| O(n) | O(1) |
[3.Heaters](https://leetcode.com/problems/heaters/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/Heaters.playground/Contents.swift) |Easy | O(nlogn) | O(1) | [Thinks](http://ww3.sinaimg.cn/large/006tNc79ly1g4knv9japzj30u00y4npd.jpg)
[4.Number of Boomerangs](https://leetcode.com/problems/number-of-boomerangs) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/NumberOfBoomerangs.playground/Contents.swift) | Easy| O(n2) | O(n) |
[5.Island Perimeter](https://leetcode.com/problems/island-perimeter/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/IslandPerimeter.playground/Contents.swift) | Easy| O(nm) | O(1) | [Thinks](http://ww3.sinaimg.cn/large/006tNc79ly1g4mfucx8s0j306t06cwed.jpg)
[6.Majority Element](https://leetcode.com/problems/majority-element/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/MajorityElement.playground/Contents.swift) | Easy| O(nm) | O(m) |
[7.Majority Element II](https://leetcode.com/problems/majority-element-ii/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/MajorityElementII.playground/Contents.swift) | Easy| O(n) | O(1) |
[8.First Missing Positive](https://leetcode.com/problems/first-missing-positive/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/FirstMissingPositive.playground/Contents.swift) | Easy| O(n) | O(1) |
[9.Intersection Of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/IntersectionOfTwoArrays.playground/Contents.swift) | Easy| O(n) | O(n) |
[10.Intersection Of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/IntersectionOfTwoArraysII.playground/Contents.swift) | Easy| O(n) | O(n) |
[11.Contain Duplicate](https://leetcode.com/problems/contains-duplicate/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/ContainDuplicate.playground/Contents.swift) | Easy| O(n) | O(n) |
[12.Contain Duplicate II](https://leetcode.com/problems/contains-duplicate-ii/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/ContainDuplicateII.playground/Contents.swift) | Easy| O(n) | O(m) |
[13.Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/RemoveDuplicatesfromSortedArray.playground/Contents.swift) | Easy| O(n) | O(1) |
[14.Remove Duplicates from Sorted Array II](https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/RemoveDuplicatesfromSortedArrayII.playground/Contents.swift) | Easy| O(n) | O(1) |
[15.Move Zeroes](https://leetcode.com/problems/move-zeroes/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/MoveZeroes.playground/Contents.swift) | Easy| O(n) | O(1) |
[16.Move Element](https://leetcode.com/problems/remove-element/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/RemoveElement.playground/Contents.swift) | Easy| O(n) | O(1) |
[17.Two Sum](https://leetcode.com/problems/two-sum/) | [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/Array/TwoSum.playground/Contents.swift) | Easy| O(n) | O(1) |

# 2. String

Title | Solution | Difficulty | Time | Space | Ideas Of Solving Problem
---|---|---|---|---|----|
[1.Fizz Buzz](https://leetcode.com/problems/fizz-buzz/)| [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/String/FizzBuzz.playground/Contents.swift) | Easy | O(n) | O(n) |

# 3. List

Title | Solution | Difficulty | Time | Space | Ideas Of Solving Problem
---|---|---|---|---|----|
[1.Reverse Linked List](https://leetcode.com/problems/reverse-linked-list/)| [Swift](https://github.com/SummerHF/LeetCode-Exercise/blob/master/List/ReverseLinkedList.playground/Contents.swift) | Easy | O(n) | O(1) |

[Exercise](https://github.com/soapyigu/LeetCode-Swift#string)
[Location](https://github.com/SummerHF/LeetCode-Exercise)
[gif](https://github.com/azl397985856/leetcode)