Skip to content

Commit

Permalink
feat: add ts solution to lc problem: No.2103 (#1916)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkasany authored Nov 2, 2023
1 parent 5af91fa commit 8a12635
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions solution/2100-2199/2103.Rings and Rods/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,16 @@ function countPoints(rings: string): number {
}
```

```ts
function countPoints(rings: string): number {
let c = 0;
for (let i = 0; i <= 9; i++) {
if (rings.includes('B' + i) && rings.includes('R' + i) && rings.includes('G' + i)) c++;
}
return c;
}
```

### **Rust**

```rust
Expand Down
10 changes: 10 additions & 0 deletions solution/2100-2199/2103.Rings and Rods/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@ function countPoints(rings: string): number {
}
```

```ts
function countPoints(rings: string): number {
let c = 0;
for (let i = 0; i <= 9; i++) {
if (rings.includes('B' + i) && rings.includes('R' + i) && rings.includes('G' + i)) c++;
}
return c;
}
```

### **Rust**

```rust
Expand Down

0 comments on commit 8a12635

Please sign in to comment.