diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 0f76703..d1fd1b5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,8 +3,9 @@ - - + + + @@ -363,7 +378,9 @@ - @@ -378,10 +395,10 @@ - + - + @@ -430,10 +447,10 @@ - + - + diff --git a/src/etc/ali/q2/Solution.java b/src/etc/ali/q2/Solution.java deleted file mode 100644 index 507d977..0000000 --- a/src/etc/ali/q2/Solution.java +++ /dev/null @@ -1,18 +0,0 @@ -package etc.ali.q2; - -/** - * 找因子直接遍历(o(n)超时) - */ -public class Solution { - public int trailingZeroes(int num) { - int rs = 0; - for (int i = 1; i <= num; i++) { - int j = i; - while (j % 5 == 0) { - rs++; - j /= 5; - } - } - return rs; - } -} diff --git a/src/q206/f1/Solution.java b/src/q206/f1/Solution.java index e1f9759..019c3d5 100644 --- a/src/q206/f1/Solution.java +++ b/src/q206/f1/Solution.java @@ -4,7 +4,7 @@ import java.util.ArrayList; import java.util.List; /** - * 暴力法舍弃空间 + * 暴力法舍弃空间 o(n) */ class Solution { public ListNode reverseList(ListNode head) { diff --git a/src/q206/f2/Solution.java b/src/q206/f2/Solution.java index c1ab87f..b36de32 100644 --- a/src/q206/f2/Solution.java +++ b/src/q206/f2/Solution.java @@ -1,7 +1,7 @@ package q206.f2; /** - * 遍历直接反向修改next指针 + * 遍历直接反向修改next指针 o(n) */ class Solution { public ListNode reverseList(ListNode head) {