04 2015 档案

摘要: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 阅读(81085) 评论(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 阅读(21093) 评论(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 阅读(80683) 评论(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 阅读(27948) 评论(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 阅读(1069) 评论(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 阅读(60556) 评论(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 阅读(489) 评论(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 阅读(30222) 评论(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 阅读(9452) 评论(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 阅读(26959) 评论(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 阅读(2500) 评论(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 阅读(31393) 评论(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 阅读(539) 评论(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 阅读(780) 评论(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 阅读(38731) 评论(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 阅读(19714) 评论(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 阅读(25660) 评论(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 阅读(31806) 评论(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 阅读(22045) 评论(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 阅读(45446) 评论(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 阅读(28995) 评论(10) 推荐(1) 编辑
摘要:Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: 阅读全文
posted @ 2015-04-14 12:53 Grandyang 阅读(26984) 评论(0) 推荐(1) 编辑
摘要:Given the disparity d and 2D point (x, y) , we can derive the 3D depth using the 4-by-4 reprojection matrix Q as follows:The reprojection matrix Q is ... 阅读全文
posted @ 2015-04-14 06:01 Grandyang 阅读(992) 评论(0) 推荐(0) 编辑
摘要:Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Each of the digits 1-9 阅读全文
posted @ 2015-04-13 12:22 Grandyang 阅读(20909) 评论(5) 推荐(2) 编辑
摘要:Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the dig 阅读全文
posted @ 2015-04-13 07:05 Grandyang 阅读(22171) 评论(4) 推荐(3) 编辑
摘要:Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2015-04-12 13:19 Grandyang 阅读(20869) 评论(0) 推荐(1) 编辑
摘要:Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen nu 阅读全文
posted @ 2015-04-12 12:03 Grandyang 阅读(38215) 评论(18) 推荐(5) 编辑
摘要:Given an array of integers nums sorted in non-decreasing order, find the starting and ending position of a given target value. If target is not found 阅读全文
posted @ 2015-04-09 13:01 Grandyang 阅读(21856) 评论(11) 推荐(3) 编辑
摘要:Given a sorted array of distinct integers and a target value, return the index if the target is found. If not, return the index where it would be if i 阅读全文
posted @ 2015-04-09 08:31 Grandyang 阅读(14956) 评论(4) 推荐(1) 编辑
摘要:Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacen 阅读全文
posted @ 2015-04-08 15:56 Grandyang 阅读(39485) 评论(5) 推荐(3) 编辑
摘要:Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining. Exampl 阅读全文
posted @ 2015-04-08 14:46 Grandyang 阅读(43600) 评论(8) 推荐(0) 编辑
摘要:Download Git for windowsOpen Git BashType in "ssh-keygen -t rsa", and then press Enter button three timesYou can find the public key in the "file id_r... 阅读全文
posted @ 2015-04-08 03:55 Grandyang 阅读(583) 评论(0) 推荐(0) 编辑
摘要:Given an input string (s) and a pattern (p), implement wildcard pattern matching with support for '?' and '*' where: '?' Matches any single character. 阅读全文
posted @ 2015-04-08 01:39 Grandyang 阅读(30816) 评论(22) 推荐(2) 编辑
摘要:Given an unsorted integer array nums, return the smallest missing positive integer. You must implement an algorithm that runs in O(n) time and uses O( 阅读全文
posted @ 2015-04-06 14:59 Grandyang 阅读(29609) 评论(19) 推荐(3) 编辑
摘要:Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a string. Note: You mus 阅读全文
posted @ 2015-04-06 06:53 Grandyang 阅读(26793) 评论(10) 推荐(4) 编辑
摘要:Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl... 阅读全文
posted @ 2015-04-04 15:06 Grandyang 阅读(13811) 评论(2) 推荐(1) 编辑
摘要:You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means 阅读全文
posted @ 2015-04-03 11:33 Grandyang 阅读(33164) 评论(7) 推荐(2) 编辑
摘要:Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearrang 阅读全文
posted @ 2015-04-02 06:14 Grandyang 阅读(24467) 评论(11) 推荐(1) 编辑
摘要:SIFT and SURF were moved to nonfree module. You need to add #include header and link with opencv_nonfree library. 阅读全文
posted @ 2015-04-01 23:17 Grandyang 阅读(994) 评论(0) 推荐(0) 编辑
摘要:Implement pow(x, n), which calculates x raised to the power n (i.e., x^n). Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input: 阅读全文
posted @ 2015-04-01 14:34 Grandyang 阅读(37231) 评论(19) 推荐(1) 编辑
摘要:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo 阅读全文
posted @ 2015-04-01 13:41 Grandyang 阅读(43015) 评论(12) 推荐(2) 编辑

Fork me on GitHub