You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: leetcode/301-400/0367.Valid-Perfect-Square/README.md
+14-14Lines changed: 14 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,28 @@
1
1
# [367.Valid Perfect Square][title]
2
2
3
-
> [!WARNING|style:flat]
4
-
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5
-
6
3
## Description
7
4
5
+
Given a positive integer num, return true if `num` is a perfect square or `false` otherwise.
6
+
7
+
A **perfect square** is an integer that is the square of an integer. In other words, it is the product of some integer with itself.
8
+
9
+
You must not use any built-in library function, such as `sqrt`.
10
+
8
11
**Example 1:**
9
12
10
13
```
11
-
Input: a = "11", b = "1"
12
-
Output: "100"
14
+
Input: num = 16
15
+
Output: true
16
+
Explanation: We return true because 4 * 4 = 16 and 4 is an integer.
13
17
```
14
18
15
-
## 题意
16
-
> ...
19
+
**Example 2:**
17
20
18
-
## 题解
19
-
20
-
### 思路1
21
-
> ...
22
-
Valid Perfect Square
23
-
```go
24
21
```
25
-
22
+
Input: num = 14
23
+
Output: false
24
+
Explanation: We return false because 3.742 * 3.742 = 14 and 3.742 is not an integer.
0 commit comments