Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add solutions to lc problem: No.2466 #3908

Merged
merged 3 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: js code
  • Loading branch information
yanglbme authored Dec 31, 2024
commit 96480bc35d69dadc5012f8ff716b7a332ca3a719
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,16 @@ function countGoodStrings(low: number, high: number, zero: number, one: number):
#### JavaScript

```js
/**
* @param {number} low
* @param {number} high
* @param {number} zero
* @param {number} one
* @return {number}
*/
function countGoodStrings(low, high, zero, one) {
const mod = 10 ** 9 + 7;
const f[] = new Array(high + 1).fill(0);
const f = Array(high + 1).fill(0);
f[0] = 1;

for (let i = 1; i <= high; i++) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,16 @@ function countGoodStrings(low: number, high: number, zero: number, one: number):
#### JavaScript

```js
/**
* @param {number} low
* @param {number} high
* @param {number} zero
* @param {number} one
* @return {number}
*/
function countGoodStrings(low, high, zero, one) {
const mod = 10 ** 9 + 7;
const f[] = new Array(high + 1).fill(0);
const f = Array(high + 1).fill(0);
f[0] = 1;

for (let i = 1; i <= high; i++) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/**
* @param {number} low
* @param {number} high
* @param {number} zero
* @param {number} one
* @return {number}
*/
function countGoodStrings(low, high, zero, one) {
const mod = 10 ** 9 + 7;
const f[] = new Array(high + 1).fill(0);
const f = Array(high + 1).fill(0);
f[0] = 1;

for (let i = 1; i <= high; i++) {
Expand Down
Loading