Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 370 Bytes

1689. 十-二进制数的最少数目.md

File metadata and controls

19 lines (13 loc) · 370 Bytes
  • 脑筋急转弯
function minPartitions(n: string): number {

    let maxCase: string = '0';

    for (const ch of n) {
        if (maxCase < ch) {
            maxCase = ch;
        }
    }

    return +maxCase;
};