上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 44 下一页
摘要: 控件的sizePolicy说明控件在布局管理中的缩放方式。Qt提供的控件都有一个合理的缺省sizePolicy,但是这个缺省值有时不能适合 所有的布局,开发人员经常需要改变窗体上的某些控件的sizePolicy。一个QSizePolicy的所有变量对水平方向和垂直方向都适用。下面列举 了一些最长用的... 阅读全文
posted @ 2015-05-22 03:21 Grandyang 阅读(24767) 评论(0) 推荐(1) 编辑
摘要: You are given a string s and an array of strings words. All the strings of words are of the same length. A concatenated substring in s is a substring 阅读全文
posted @ 2015-05-22 00:07 Grandyang 阅读(23458) 评论(11) 推荐(0) 编辑
摘要: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are ar 阅读全文
posted @ 2015-05-21 03:26 Grandyang 阅读(25876) 评论(10) 推荐(1) 编辑
摘要: Given an m x n board of characters and a list of strings words, return all words on the board. Each word must be constructed from letters of sequentia 阅读全文
posted @ 2015-05-20 00:06 Grandyang 阅读(22081) 评论(10) 推荐(0) 编辑
摘要: Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that: 0 <= a, b, c, d < n a 阅读全文
posted @ 2015-05-19 23:28 Grandyang 阅读(36710) 评论(16) 推荐(2) 编辑
摘要: Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target. Return the sum of t 阅读全文
posted @ 2015-05-18 02:24 Grandyang 阅读(27339) 评论(2) 推荐(1) 编辑
摘要: Design a data structure that supports the following two operations: search(word) can search a literal word or a regular expression string containing o 阅读全文
posted @ 2015-05-16 05:59 Grandyang 阅读(17223) 评论(6) 推荐(1) 编辑
摘要: Now compile your program withg++ -std=c++11 your_file.cpp -o main 阅读全文
posted @ 2015-05-15 14:16 Grandyang 阅读(360) 评论(0) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to 阅读全文
posted @ 2015-05-14 23:19 Grandyang 阅读(20602) 评论(0) 推荐(0) 编辑
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2015-05-13 22:37 Grandyang 阅读(30333) 评论(18) 推荐(0) 编辑
摘要: Implement a trie with insert, search, and startsWith methods. Example: Note: You may assume that all inputs are consist of lowercase letters a-z. All 阅读全文
posted @ 2015-05-10 06:32 Grandyang 阅读(23494) 评论(14) 推荐(0) 编辑
摘要: In the C++ STL, the vector size() function return size_t, which is unsigned int, not int. So imagine this, define an empty vector v, and v.size() shou... 阅读全文
posted @ 2015-05-08 06:11 Grandyang 阅读(808) 评论(0) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to 阅读全文
posted @ 2015-05-07 13:01 Grandyang 阅读(44374) 评论(26) 推荐(0) 编辑
摘要: Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] 阅读全文
posted @ 2015-05-06 13:01 Grandyang 阅读(96043) 评论(24) 推荐(7) 编辑
摘要: // Write data FileStorage fs("test.yml", FileStorage::WRITE); fs << "MyString" << "123abc"; fs.release(); // Read data FileStorage ... 阅读全文
posted @ 2015-05-06 04:56 Grandyang 阅读(677) 评论(0) 推荐(0) 编辑
摘要: Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: The a 阅读全文
posted @ 2015-05-06 01:05 Grandyang 阅读(68690) 评论(27) 推荐(3) 编辑
摘要: Reverse a singly linked list. Example: Follow up: A linked list can be reversed either iteratively or recursively. Could you implement both? 之前做到 Reve 阅读全文
posted @ 2015-05-05 12:45 Grandyang 阅读(26804) 评论(9) 推荐(1) 编辑
摘要: 这个马拉车算法 Manacher‘s Algorithm 是用来查找一个字符串的最长回文子串的线性方法,由一个叫 Manacher 的人在 1975 年发明的,这个方法的最大贡献是在于将时间复杂度提升到了线性,这是非常了不起的。对于回文串想必大家都不陌生,就是正读反读都一样的字符串,比如 "bob" 阅读全文
posted @ 2015-05-04 13:30 Grandyang 阅读(86395) 评论(36) 推荐(23) 编辑
摘要: Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity shou 阅读全文
posted @ 2015-04-29 14:37 Grandyang 阅读(80936) 评论(40) 推荐(6) 编辑
摘要: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2015-04-29 13:49 Grandyang 阅读(21073) 评论(14) 推荐(4) 编辑
摘要: Open VS2010, create a new project, then open Property Manager, double-click Microsoft.Cpp.win32.user, open the Property Pages. Then go to VC++ Directo 阅读全文
posted @ 2015-04-29 04:16 Grandyang 阅读(1319) 评论(0) 推荐(0) 编辑
摘要: Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer 阅读全文
posted @ 2015-04-29 00:09 Grandyang 阅读(80545) 评论(31) 推荐(4) 编辑
摘要: Count the number of prime numbers less than a non-negative number, n. Example 1: Input: n = 10 Output: 4 Explanation: There are 4 prime numbers less t 阅读全文
posted @ 2015-04-28 13:40 Grandyang 阅读(27906) 评论(3) 推荐(1) 编辑
摘要: When using PCL 1.4.0 in the release mode building under VS2010, we might sometime get the error "Debug Assertion Failed Expression vector iterators in... 阅读全文
posted @ 2015-04-28 04:31 Grandyang 阅读(1068) 评论(0) 推荐(0) 编辑
摘要: Given an input string s and a pattern p, implement regular expression matching with support for '.' and '*' where: '.' Matches any single character.​​ 阅读全文
posted @ 2015-04-27 23:05 Grandyang 阅读(60497) 评论(16) 推荐(3) 编辑
摘要: Add in the system Path:C:\opencv\build\x86\vc11\bin;Project->Project Property->Configuration Properties->VC++Directories ->Include Directories:C:\open... 阅读全文
posted @ 2015-04-25 06:05 Grandyang 阅读(488) 评论(0) 推荐(0) 编辑
摘要: You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, hei 阅读全文
posted @ 2015-04-25 00:28 Grandyang 阅读(30154) 评论(6) 推荐(1) 编辑
摘要: Remove all elements from a linked list of integers that have value val. Example Given: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6 Return: 1 --> 2 阅读全文
posted @ 2015-04-24 00:29 Grandyang 阅读(9437) 评论(5) 推荐(0) 编辑
摘要: Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. Return the answer in any 阅读全文
posted @ 2015-04-24 00:06 Grandyang 阅读(26914) 评论(12) 推荐(1) 编辑
摘要: This error happens in Release mode of VS2010, solve this problem by do following:.Go to Project Pages / Configuration Properties / C,C++ / Preprocesso... 阅读全文
posted @ 2015-04-23 00:22 Grandyang 阅读(2497) 评论(0) 推荐(0) 编辑
摘要: Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege 阅读全文
posted @ 2015-04-22 13:40 Grandyang 阅读(31374) 评论(7) 推荐(2) 编辑
摘要: The OpenCV function imread() not working in OpenCV 2.4.11 Debug mode of VS2010 under Win32, the way we want to make it work is to change it to Release... 阅读全文
posted @ 2015-04-22 07:36 Grandyang 阅读(538) 评论(0) 推荐(0) 编辑
摘要: Add in the system Path:C:\opencv\build\x86\vc10\bin;Project->Project Property->Configuration Properties->VC++Directories ->Include Directories:C:\open... 阅读全文
posted @ 2015-04-22 02:52 Grandyang 阅读(779) 评论(0) 推荐(0) 编辑
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. Example 1: Input: n = 3 Output: ["((()))","(() 阅读全文
posted @ 2015-04-21 13:47 Grandyang 阅读(38655) 评论(10) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head. You must solve the problem without modifying the values in the list's nodes (i 阅读全文
posted @ 2015-04-20 15:20 Grandyang 阅读(19675) 评论(11) 推荐(1) 编辑
摘要: Given the head of a linked list, reverse the nodes of the list k at a time, and return the modified list. k is a positive integer and is less than or 阅读全文
posted @ 2015-04-20 13:24 Grandyang 阅读(25594) 评论(10) 推荐(0) 编辑
摘要: Given two integers dividend and divisor, divide two integers without using multiplication, division, and mod operator. The integer division should tru 阅读全文
posted @ 2015-04-16 14:04 Grandyang 阅读(31760) 评论(25) 推荐(1) 编辑
摘要: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the range [5, 阅读全文
posted @ 2015-04-16 11:53 Grandyang 阅读(22022) 评论(8) 推荐(0) 编辑
摘要: A permutation of an array of integers is an arrangement of its members into a sequence or linear order. For example, for arr = [1,2,3], the following 阅读全文
posted @ 2015-04-15 12:53 Grandyang 阅读(45354) 评论(13) 推荐(2) 编辑
摘要: Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring. Example 1: Inpu 阅读全文
posted @ 2015-04-14 14:02 Grandyang 阅读(28955) 评论(10) 推荐(1) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 44 下一页
Fork me on GitHub