File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ LeetCode
276
276
| 139| [ Word Break] ( https://leetcode.com/problems/word-break/ ) | | Medium|
277
277
| 138| [ Copy List with Random Pointer] ( https://leetcode.com/problems/copy-list-with-random-pointer/ ) | | Hard|
278
278
| 137| [ Single Number II] ( https://leetcode.com/problems/single-number-ii/ ) | | Medium|
279
- | 136| [ Single Number] ( https://leetcode.com/problems/single-number/ ) | | Medium|
279
+ | 136| [ Single Number] ( https://leetcode.com/problems/single-number/ ) | [ java ] ( ./algorithms/singleNum/Solution.java ) | Medium|
280
280
| 135| [ Candy] ( https://leetcode.com/problems/candy/ ) | | Hard|
281
281
| 134| [ Gas Station] ( https://leetcode.com/problems/gas-station/ ) | | Medium|
282
282
| 133| [ Clone Graph] ( https://leetcode.com/problems/clone-graph/ ) | | Medium|
Original file line number Diff line number Diff line change
1
+ public class Solution {
2
+ public int singleNumber (int [] nums ) {
3
+ int ans = 0 ;
4
+ for (int num : nums ) {
5
+ ans ^= num ;
6
+ }
7
+ return ans ;
8
+ }
9
+ }
You can’t perform that action at this time.
0 commit comments