File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
src/test/java/com/fishercoder Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ Your ideas/fixes/algorithms are more than welcome!
436
436
|208|[ Implement Trie] ( https://leetcode.com/problems/implement-trie-prefix-tree/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_208.java ) | O(n)|O(1) | Medium| Trie
437
437
| 207| [ Course Schedule] ( https://leetcode.com/problems/course-schedule/ ) | [ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_207.java ) | O(?)| O(?) | Medium|
438
438
|206|[ Reverse Linked List] ( https://leetcode.com/problems/reverse-linked-list/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_206.java ) | O(n)|O(1) | Easy | Linked List
439
- |205|[ Isomorphic Strings] ( https://leetcode.com/problems/isomorphic-strings/ ) |[ Solution] ( ../../blmaster/ src/94fishercoder/algorithms /_205.java ) | O(n)|O(1) | Easy
439
+ |205|[ Isomorphic Strings] ( https://leetcode.com/problems/isomorphic-strings/ ) |[ Solution] ( ../master/ src/main/java/com/fishercoder/solutions /_205.java ) | O(n)|O(1) | Easy
440
440
|204|[ Count Primes] ( https://leetcode.com/problems/count-primes/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_204.java ) | O(nloglogn)|O(n) | Easy | The Sieve of Eratosthenes
441
441
|203|[ Remove Linked List Elements] ( https://leetcode.com/problems/remove-linked-list-elements/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_203.java ) | O(n)|O(1) | Easy
442
442
|202|[ Happy Number] ( https://leetcode.com/problems/happy-number/ ) |[ Solution] ( ../master/src/main/java/com/fishercoder/solutions/_202.java ) | O(k)|O(k) | Easy
Original file line number Diff line number Diff line change @@ -40,4 +40,34 @@ public void test4() {
40
40
assertEquals (114155 , solution2 .countPrimes (1500000 ));
41
41
}
42
42
43
+ @ Test
44
+ public void test5 () {
45
+ assertEquals (10 , solution1 .countPrimes (30 ));
46
+ assertEquals (10 , solution2 .countPrimes (30 ));
47
+ }
48
+
49
+ @ Test
50
+ public void test6 () {
51
+ assertEquals (4 , solution1 .countPrimes (10 ));
52
+ assertEquals (4 , solution2 .countPrimes (10 ));
53
+ }
54
+
55
+ @ Test
56
+ public void test7 () {
57
+ assertEquals (8 , solution1 .countPrimes (20 ));
58
+ assertEquals (8 , solution2 .countPrimes (20 ));
59
+ }
60
+
61
+ @ Test
62
+ public void test8 () {
63
+ assertEquals (12 , solution1 .countPrimes (40 ));
64
+ assertEquals (12 , solution2 .countPrimes (40 ));
65
+ }
66
+
67
+ @ Test
68
+ public void test9 () {
69
+ assertEquals (15 , solution1 .countPrimes (50 ));
70
+ assertEquals (15 , solution2 .countPrimes (50 ));
71
+ }
72
+
43
73
}
You can’t perform that action at this time.
0 commit comments