摘要:
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... 阅读全文
摘要:
1.一般我们的事件循环都是由exec()来开启的,例如下面的例子:1 QCoreApplicaton::exec()2 QApplication::exec()3 QDialog::exec()4 QThread::exec()5 QDrag::exec()6 QMenu::exec() 这些都开... 阅读全文
摘要:
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... 阅读全文