摘要:
Design a data structure that supports the following two operations:void addWord(word)bool search(word)search(word) can search a literal word or a regu... 阅读全文
摘要:
Givennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, a solution set is:"((()))... 阅读全文
摘要:
Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following matr... 阅读全文
摘要:
Given a 2D matrixmatrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1,col1) and lower right corner (row2,c... 阅读全文
摘要:
Given an integer, write a function to determine if it is a power of two.看一个数是不是2的幂,代码如下: 1 class Solution { 2 public: 3 bool isPowerOfTwo(int n) {... 阅读全文
摘要:
Given an unsorted array of integers, find the length of longest increasing subsequence.For example,Given[10, 9, 2, 5, 3, 7, 101, 18],The longest incre... 阅读全文
摘要:
Write a program to find then-th ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For example,1, 2, 3, 4, 5, 6, 8... 阅读全文
摘要:
timer = new Timer(this);改成 timer = new Timer();就可以了。因为你timer是属于主线程的,尽量不要在非主线程里创建新的对象并指定其对象为主线程内的对象,否则QApplication.exec会warning.this->exec();这样会显示的调用消息... 阅读全文