摘要:
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. 第一个思路肯定可能就是递归了 class Solution { public: int mark = 0; void dfs(string& s 阅读全文
摘要:
Given a grid where each entry is only 0 or 1, find the number of corner rectangles. A corner rectangle is 4 distinct 1s on the grid that form an axis 阅读全文
摘要:
Find the minimum length word from a given dictionary words, which has all the letters from the string licensePlate. Such a word is said to complete th 阅读全文
摘要:
Once you pay the cost, you can either climb one or two steps. You need to find minimum cost to reach the top of the floor, and you can either start fr 阅读全文
摘要:
Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum pro 阅读全文
摘要:
"原文" Given a non empty string s, you may delete at most one character. Judge whether you can make it a palindrome. 一道不错的题目。题目大意是最多删除一个字母,使得原来的字符串是回文串。 阅读全文
摘要:
Implement pow(x, n). 快速幂直接搞,注意边界。 class Solution { public: double pow(double a, long long n) { double tmp = 1.0; if (a == 1) return 1; if (n == 0) ret 阅读全文