Skip to content

Commit ffc6829

Browse files
committed
Fixed the chapter Divide and Conquer
1 parent 1359fc5 commit ffc6829

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

C++/chapDivideAndConquer.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ \subsubsection{代码}
2020
// 时间复杂度O(logn),空间复杂度O(1)
2121
class Solution {
2222
public:
23-
double pow(double x, int n) {
23+
double myPow(double x, int n) {
2424
if (n < 0) return 1.0 / power(x, -n);
2525
else return power(x, n);
2626
}
@@ -62,7 +62,7 @@ \subsubsection{代码}
6262
// 时间复杂度O(logn),空间复杂度O(1)
6363
class Solution {
6464
public:
65-
int sqrt(int x) {
65+
int mySqrt(int x) {
6666
int left = 1, right = x / 2;
6767
int last_mid; // 记录最近一次mid
6868

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy