Skip to content

Commit 94ce043

Browse files
committed
136
1 parent 9ef03f5 commit 94ce043

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
|24|[Swap Nodes in Pairs](https://leetcode.com/problems/swap-nodes-in-pairs/#/solutions)| [Python](./linkedlist/swapPairs.py) | _O(n)_| _O(1)_|
7575
|148|[Sort List](https://leetcode.com/problems/sort-list/#/description)| [Python](./linkedlist/sortList.py) | _O(nlogn)_| _O(1)_|
7676
|61|[Rotate List](https://leetcode.com/problems/rotate-list/#/description)| [Python](./linkedlist/rotateRight.py) | _O(n)_| _O(1)_|
77-
|19|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/#/description)| [Python](./linkedlist/removeNthFromEnd.py) | _O(n)_| _O(1)_|
77+
|19|[Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/#/description)| [Python](./linkedlist/removeNthFromEnd.py) | _O(n)_| _O(1)_|[:tv:](https://youtu.be/8Jq8ikIeF1M)|
7878
|138|[Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/#/description)| [Python](./linkedlist/copyRandomList.py) | _O(n)_| _O(n)_|
7979

8080

@@ -162,7 +162,8 @@
162162
|45|[Jump Game II](https://leetcode.com/problems/jump-game-ii/#/description)| [Python ](./dp/55.py) | _O(N^2)_| _O(1)_ | TLE with DP/Use Greedy for O(N) Solution |
163163
|300|[Longest Increasing Subsequence](https://leetcode.com/problems/longest-increasing-subsequence/#/description)| [Python ](./dp/300.py) | _O(N^2)_| _O(1)_ | Use Binary-Search for NlogN Solution|
164164

165-
165+
## BitMap Easy
166+
|136|[Single Number](https://leetcode.com/problems/single-number/description/)| [Python ](./bitmap/136.py) | _O(N)_| _O(1)_ | [:tv:](https://www.youtube.com/watch?v=C4GWPpNivfI&list=PLFp7f5kTehDlpCj5puB3WGbH1Qi3eSDat&index=6&t=7s)|
166167

167168

168169
#### License

bitmap/136.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution(object):
2+
def singleNumber(self, nums):
3+
"""
4+
:type nums: List[int]
5+
:rtype: int
6+
"""
7+
res = 0
8+
for num in nums:
9+
res ^= num
10+
return res

0 commit comments

Comments
 (0)