Skip to content

Commit bd5c792

Browse files
authoredJun 26, 2021
feat: add typescript solution to lc problem: No.1689.Partitioning Into Minimum Number Of Deci-Binary Numbers (doocs#480)
1 parent ab77f1f commit bd5c792

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
 

‎solution/1600-1699/1689.Partitioning Into Minimum Number Of Deci-Binary Numbers/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ class Solution {
7575
}
7676
```
7777

78+
### **TypeScript**
79+
80+
```ts
81+
function minPartitions(n: string): number {
82+
let nums = n.split('').map(d => parseInt(d));
83+
let ans = Math.max(...nums);
84+
return ans;
85+
};
86+
```
87+
7888
### **C++**
7989

8090
```cpp

‎solution/1600-1699/1689.Partitioning Into Minimum Number Of Deci-Binary Numbers/README_EN.md

+10
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ class Solution {
7878
}
7979
```
8080

81+
### **TypeScript**
82+
83+
```ts
84+
function minPartitions(n: string): number {
85+
let nums = n.split('').map(d => parseInt(d));
86+
let ans = Math.max(...nums);
87+
return ans;
88+
};
89+
```
90+
8191
### **C++**
8292

8393
```cpp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function minPartitions(n: string): number {
2+
let nums = n.split('').map(d => parseInt(d));
3+
let ans = Math.max(...nums);
4+
return ans;
5+
};

0 commit comments

Comments
 (0)
Please sign in to comment.