摘要:
Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string which is for 阅读全文
摘要:
class Solution { public: int GetUglyNumber_Solution(int index) { int res = 0, i = 1,tmp; int arr[index]; int ptrto2 = 0, ptrto3 = 0, ptrto5 = 0; arr[0] = 1; ... 阅读全文
摘要:
258. Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is 阅读全文
摘要:
1. 有一个没有刻度的长方形的塑料盒子,没有盖子,它的容积是1升,请问如果只能使用这个盒子称量一次,能够准确的量出多少升的水(B)? A 0.4升 B 0.5升 C 0.8升 D 0.3升 解析: 0.5 升,倾斜长方形盒子,水位到达盒子的上一边及底下的边线即可。也能量出1/6(?) 2. 有三个杯 阅读全文