Skip to content

Commit 65603cb

Browse files
edit 136
1 parent ceba08b commit 65603cb

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ Your ideas/fixes/algorithms are more than welcome!
422422
|139|[Word Break](https://leetcode.com/problems/word-break/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_139.java)| O(n^2)|O(n) | Medium| DP
423423
|138|[Copy List with Random Pointer](https://leetcode.com/problems/copy-list-with-random-pointer/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_138.java)| O(n)|O(n) | Medium| LinkedList, HashMap
424424
|137|[Single Number II](https://leetcode.com/problems/single-number-ii/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_137.java)| O(n)|O(n) | Medium|
425+
|136|[Single Number](https://leetcode.com/problems/single-number/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_136.java)| O(n)|O(n) | Medium|
425426
|135|[Candy](https://leetcode.com/problems/candy/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_135.java)| O(n)|O(1) | Hard| Greedy
426427
|134|[Gas Station](https://leetcode.com/problems/gas-station/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_134.java)| O(n)|O(1) | Medium| Greedy
427428
|133|[Clone Graph](https://leetcode.com/problems/clone-graph/)|[Solution](../master/src/main/java/com/fishercoder/solutions/_133.java)| O(n)|O(n) | Medium| HashMap, BFS, Graph

src/main/java/com/fishercoder/solutions/SingleNumber.java renamed to src/main/java/com/fishercoder/solutions/_136.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
1212
1313
*/
14-
public class SingleNumber {
14+
15+
public class _136 {
1516
//approach 1: use set, since this problem explicitly states that every element appears twice and only one appears once
1617
//so, we could safely remove the ones that are already in the set, O(n) time and O(n) space.
1718
//HashTable approach works similarly like this one, but it could be more easily extend to follow-up questions.

0 commit comments

Comments
 (0)