diff --git a/Algorithms/61.Rotate List/Rotate List.go b/Algorithms/61. Rotate List/61. Rotate List.go similarity index 100% rename from Algorithms/61.Rotate List/Rotate List.go rename to Algorithms/61. Rotate List/61. Rotate List.go diff --git a/Algorithms/61.Rotate List/Rotate List_test.go b/Algorithms/61. Rotate List/61. Rotate List_test.go similarity index 100% rename from Algorithms/61.Rotate List/Rotate List_test.go rename to Algorithms/61. Rotate List/61. Rotate List_test.go diff --git a/Algorithms/61.Rotate List/README.md b/Algorithms/61. Rotate List/README.md similarity index 92% rename from Algorithms/61.Rotate List/README.md rename to Algorithms/61. Rotate List/README.md index 7f0bb5cc..1ecf121b 100644 --- a/Algorithms/61.Rotate List/README.md +++ b/Algorithms/61. Rotate List/README.md @@ -30,4 +30,6 @@ rotate 4 steps to the right: 2->0->1->NULL 旋转链表 K 次。 -这道题需要注意的点是,K 可能很大,K = 2000000000 ,如果是循环肯定会超时。应该找出 O(n) 的复杂度的算法才行。由于是循环旋转,最终状态其实是确定的,利用链表的长度取余可以得到链表的最终旋转结果。 \ No newline at end of file +这道题需要注意的点是,K 可能很大,K = 2000000000 ,如果是循环肯定会超时。应该找出 O(n) 的复杂度的算法才行。由于是循环旋转,最终状态其实是确定的,利用链表的长度取余可以得到链表的最终旋转结果。 + +这道题也不能用递归,递归解法会超时。 \ No newline at end of file