Algorithm Exercise Recording
Title | Solution | Difficulty | Time | Space | Ideas Of Solving Problem |
---|---|---|---|---|---|
1.Sort Array By Parity | Swift | Easy | O(n) | O(1) | |
2.Max Consecutive Ones | Swift | Easy | O(n) | O(1) | |
3.Heaters | Swift | Easy | O(nlogn) | O(1) | Thinks |
4.Number of Boomerangs | Swift | Easy | O(n2) | O(n) | |
5.Island Perimeter | Swift | Easy | O(nm) | O(1) | Thinks |
6.Majority Element | Swift | Easy | O(nm) | O(m) | |
7.Majority Element II | Swift | Easy | O(n) | O(1) | |
8.First Missing Positive | Swift | Easy | O(n) | O(1) | |
9.Intersection Of Two Arrays | Swift | Easy | O(n) | O(n) | |
10.Intersection Of Two Arrays II | Swift | Easy | O(n) | O(n) | |
11.Contain Duplicate | Swift | Easy | O(n) | O(n) | |
12.Contain Duplicate II | Swift | Easy | O(n) | O(m) | |
13.Remove Duplicates from Sorted Array | Swift | Easy | O(n) | O(1) | |
14.Remove Duplicates from Sorted Array II | Swift | Easy | O(n) | O(1) | |
15.Move Zeroes | Swift | Easy | O(n) | O(1) | |
16.Move Element | Swift | Easy | O(n) | O(1) | |
17.Two Sum | Swift | Easy | O(n) | O(1) |
Title | Solution | Difficulty | Time | Space | Ideas Of Solving Problem |
---|---|---|---|---|---|
1.Fizz Buzz | Swift | Easy | O(n) | O(n) |
Title | Solution | Difficulty | Time | Space | Ideas Of Solving Problem |
---|---|---|---|---|---|
1.Reverse Linked List | Swift | Easy | O(n) | O(1) |