摘要:
class Solution { //数学模幂运算公式 a * b % k = (a % k) * (b % k) % k;public: int base = 1337; int superPow(int a, vector<int>& b) { if(b.empty()) return 1; i 阅读全文
摘要:
题目12 bool has_path_core(char *matrix, int rows, int cols, int row, int col, string a, int &pathlen, bool *visited){ if(pathlen == a.length() - 1) retu 阅读全文
摘要:
简单解法 时间复杂度为find的复杂度O(m * n) Space = O(n) class Solution {public: int repeatedStringMatch(string A, string B) { int res = 1; string C(A); while(C.lengt 阅读全文
摘要:
//一次复习了三道 循序渐进 class Solution {public: int nthSuperUglyNumber(int n, vector<int>& primes) { vector<int> ivec(n, 0); int primes_size = primes.size(); v 阅读全文