Leetcode刷题笔记题解(C++):2266. 统计打字方案数

Leetcode刷题笔记题解(C++):2266. 统计打字方案数_第1张图片

Leetcode刷题笔记题解(C++):2266. 统计打字方案数_第2张图片

class Solution {
public:
    int countTexts(string pressedKeys) {
        int m = 1000000007;
        vectordp3 = {1,1,2,4};
        vectordp4 = {1,1,2,4};
        int n = pressedKeys.size();
        for(int i = 4;i

你可能感兴趣的:(Leetcode算法题解,leetcode,笔记,c++)