上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 45 下一页
摘要: Given an array of scores that are non-negative integers. Player 1 picks one of the numbers from either end of the array followed by the player 2 and t 阅读全文
posted @ 2017-02-06 11:25 Grandyang 阅读(12748) 评论(4) 推荐(0)
摘要: By now, you are given a secret signature consisting of character 'D' and 'I'. 'D' represents a decreasing relationship between two numbers, 'I' repres 阅读全文
posted @ 2017-02-05 00:07 Grandyang 阅读(7437) 评论(4) 推荐(1)
摘要: 在Qt和PCL联合编译的过程中,会出现各种各样的错误,解决这些错误的过程真是痛苦万分,所以总结一些常见错误方便自己也方便他人。比如我们要编译PCL1.8.0中的apps中的point_cloud_editor这个应用时,可能会遇到如下错误: 这个错误的解决方法很简单,哪个cpp文件产生了这些错误,就 阅读全文
posted @ 2017-02-04 07:28 Grandyang 阅读(1108) 评论(0) 推荐(0)
摘要: 在编译一些大型SDK的时候,比如Qt,OpenCV, PCL, VTK, ITK等等,在VS中,我们需要将编译生成的.lib文件加入Linker->Input中,但是往往生成的.lib文件有很多很多个,一个一个的把名字加进来实在是太累,我们可以用cmd命令行来快速获得某个文件夹下的所有文件的名字,打 阅读全文
posted @ 2017-02-03 04:53 Grandyang 阅读(354) 评论(0) 推荐(0)
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di 阅读全文
posted @ 2017-02-02 10:00 Grandyang 阅读(8461) 评论(0) 推荐(0)
摘要: A magical string S consists of only '1' and '2' and obeys the following rules: The string S is magical because concatenating the number of contiguous 阅读全文
posted @ 2017-01-15 03:50 Grandyang 阅读(8026) 评论(2) 推荐(0)
摘要: 在Mac上使用Latex的话主流是安装MacTex,对于IDE的选择有很多,像什么自带的TexShop,或者是TexStudio,Latexian,Texpad,Texmaker等,甚至可以直接使用一些通用的编程IDE,比如MacVim,Emacs,Sublime Text等等。 博主喜欢用TexS 阅读全文
posted @ 2017-01-13 13:11 Grandyang 阅读(11009) 评论(0) 推荐(0)
摘要: Now you are given a string S, which represents a software license key which we would like to format. The string S is composed of alphanumerical charac 阅读全文
posted @ 2017-01-12 14:02 Grandyang 阅读(6515) 评论(0) 推荐(0)
摘要: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given inte 阅读全文
posted @ 2017-01-11 23:55 Grandyang 阅读(8956) 评论(1) 推荐(0)
摘要: Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. Given n points on a 2D plane, find the maximum num 阅读全文
posted @ 2017-01-10 14:29 Grandyang 阅读(1107) 评论(0) 推荐(0)
摘要: 在之前的博客QInputDialog 使用方法中展示了利用QInputDialog可以快速通过一行代码来生成一个输入框,来获取用户的输入值,那么如果我们希望获取多个输入值,怎么办呢?那么此时用QInputDialog就没法实现了,我们必须基于QDialog类重新写一个类,可是只是一个简单的多值输入框 阅读全文
posted @ 2017-01-09 08:40 Grandyang 阅读(6904) 评论(0) 推荐(1)
摘要: Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put. get(key) - Get t 阅读全文
posted @ 2017-01-07 03:47 Grandyang 阅读(21932) 评论(11) 推荐(0)
摘要: 在OpenCV中,有强大的处理相机事件的api,但是貌似没有直接获取相机的最大分辨率的函数,通过属性CV_CAP_PROP_FRAME_HEIGHT和CV_CAP_PROP_FRAME_WIDTH直接获取的貌似只是默认的分辨率640x480,不过我们可以通过手动设置来修改分辨率,使其可以达到自身所支 阅读全文
posted @ 2017-01-06 14:30 Grandyang 阅读(8704) 评论(0) 推荐(0)
摘要: Given an array of strings words (without duplicates), return all the concatenated words in the given list of words. A concatenated word is defined as 阅读全文
posted @ 2017-01-05 23:59 Grandyang 阅读(9921) 评论(5) 推荐(1)
摘要: Write a program to find the node at which the intersection of two singly linked lists begins. Notice If the two linked lists have no intersection at a 阅读全文
posted @ 2017-01-04 11:56 Grandyang 阅读(761) 评论(0) 推荐(0)
摘要: Merge two sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should be made by splicing together the nodes of the 阅读全文
posted @ 2017-01-03 06:09 Grandyang 阅读(726) 评论(0) 推荐(0)
摘要: PLY格式是比较流行的保存点云Point Cloud的格式,可以用MeshLab等软件打开,而VTK是医学图像处理中比较常用的格式,可以使用VTK库和ITK库进行更加复杂的运算处理。我们可以使用ParaView软件对VTK格式文件进行预览和简单处理,ParaView也可以打开PLY格式,但是就没有t 阅读全文
posted @ 2017-01-02 11:06 Grandyang 阅读(2174) 评论(0) 推荐(0)
摘要: Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple 阅读全文
posted @ 2017-01-01 03:09 Grandyang 阅读(586) 评论(0) 推荐(0)
摘要: Given an array of integers, find a contiguous subarray which has the largest sum. Notice The subarray should contain at least one number. Have you met 阅读全文
posted @ 2016-12-31 08:09 Grandyang 阅读(1538) 评论(0) 推荐(0)
摘要: Remember the story of Little Match Girl? By now, you know exactly what matchsticks the little match girl has, please find out a way you can make one s 阅读全文
posted @ 2016-12-30 22:07 Grandyang 阅读(9986) 评论(6) 推荐(1)
摘要: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twi 阅读全文
posted @ 2016-12-29 03:56 Grandyang 阅读(9812) 评论(4) 推荐(1)
摘要: Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文
posted @ 2016-12-28 09:33 Grandyang 阅读(17307) 评论(9) 推荐(0)
摘要: Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or 阅读全文
posted @ 2016-12-27 06:12 Grandyang 阅读(12353) 评论(13) 推荐(0)
摘要: Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] 阅读全文
posted @ 2016-12-26 14:16 Grandyang 阅读(18578) 评论(3) 推荐(0)
摘要: You are given two linked lists representing two non-negative numbers. The most significant digit comes first and each of their nodes contain a single 阅读全文
posted @ 2016-12-23 23:55 Grandyang 阅读(22298) 评论(0) 推荐(1)
摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2016-12-22 05:36 Grandyang 阅读(14710) 评论(0) 推荐(0)
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Now your job is to find the total 阅读全文
posted @ 2016-12-21 16:08 Grandyang 阅读(10363) 评论(2) 推荐(1)
摘要: The Hamming distance between two integers is the number of positions at which the corresponding bits are different. Given two integers x and y, calcul 阅读全文
posted @ 2016-12-20 01:05 Grandyang 阅读(22583) 评论(8) 推荐(1)
摘要: Write an algorithm which computes the number of trailing zeros in n factorial. Have you met this question in a real interview? Yes Write an algorithm 阅读全文
posted @ 2016-12-19 23:30 Grandyang 阅读(1198) 评论(0) 推荐(0)
摘要: Given a non-empty string, encode the string such that its encoded length is the shortest. The encoding rule is: k[encoded_string], where the encoded_s 阅读全文
posted @ 2016-12-18 14:12 Grandyang 阅读(13503) 评论(15) 推荐(0)
摘要: Sometimes when you open a VS2010 project, an error window will pop up with the error message "Exceptions has been thrown by the target of an invocatio 阅读全文
posted @ 2016-12-17 05:21 Grandyang 阅读(684) 评论(0) 推荐(0)
摘要: In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue. For now, suppose you are a domin 阅读全文
posted @ 2016-12-16 23:53 Grandyang 阅读(13682) 评论(3) 推荐(1)
摘要: In this problem, your job to write a function to check whether a input string is a valid IPv4 address or IPv6 address or neither. IPv4 addresses are c 阅读全文
posted @ 2016-12-15 23:53 Grandyang 阅读(10730) 评论(0) 推荐(1)
摘要: Winter is coming! Your first job during the contest is to design a standard heater with fixed warm radius to warm all the houses. Now, you are given p 阅读全文
posted @ 2016-12-14 23:45 Grandyang 阅读(12709) 评论(8) 推荐(0)
摘要: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. 阅读全文
posted @ 2016-12-12 23:03 Grandyang 阅读(973) 评论(0) 推荐(0)
摘要: Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc", 3] ="abcabcabc". On the other hand, we define that stri 阅读全文
posted @ 2016-12-09 14:06 Grandyang 阅读(8013) 评论(5) 推荐(0)
摘要: Given a list of points that form a polygon when joined sequentially, find if this polygon is convex (Convex polygon definition). Note: Example 1: Exam 阅读全文
posted @ 2016-12-08 22:29 Grandyang 阅读(8554) 评论(3) 推荐(0)
摘要: Consider the string s to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz", so s will look like this: "...zabcdefghijklmnopqrstuvwxyza 阅读全文
posted @ 2016-12-07 22:25 Grandyang 阅读(7616) 评论(3) 推荐(1)
摘要: Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the string 阅读全文
posted @ 2016-12-06 14:07 Grandyang 阅读(5381) 评论(3) 推荐(0)
摘要: Given k strings, find the longest common prefix (LCP). Given k strings, find the longest common prefix (LCP). Have you met this question in a real int 阅读全文
posted @ 2016-12-05 10:30 Grandyang 阅读(787) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 45 下一页
Fork me on GitHub