Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca21e27

Browse files
feat: update solutions to lcp problem: No.01, No.02
1 parent d7c72d6 commit ca21e27

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

‎lcp/LCP 01. 猜数字/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func game(guess []int, answer []int) int {
105105
var game = function (guess, answer) {
106106
let ans = 0;
107107
for (let i = 0; i < 3; ++i) {
108-
ans += guess[i] == answer[i];
108+
ans += guess[i] === answer[i];
109109
}
110110
return ans;
111111
};

‎lcp/LCP 01. 猜数字/Solution.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
var game = function (guess, answer) {
77
let ans = 0;
88
for (let i = 0; i < 3; ++i) {
9-
ans += guess[i] == answer[i];
9+
ans += guess[i] === answer[i];
1010
}
1111
return ans;
1212
};

‎lcp/LCP 02. 分式化简/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func fraction(cont []int) []int {
128128
*/
129129
var fraction = function (cont) {
130130
function dfs(i) {
131-
if (i == cont.length - 1) {
131+
if (i === cont.length - 1) {
132132
return [cont[i], 1];
133133
}
134134
const [a, b] = dfs(i + 1);

‎lcp/LCP 02. 分式化简/Solution.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
var fraction = function (cont) {
66
function dfs(i) {
7-
if (i == cont.length - 1) {
7+
if (i === cont.length - 1) {
88
return [cont[i], 1];
99
}
1010
const [a, b] = dfs(i + 1);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /