03 2017 档案

摘要:You have n super washing machines on a line. Initially, each washing machine has some dresses or is empty. For each move, you could choose any m (1 ≤ 阅读全文
posted @ 2017-03-30 21:12 Grandyang 阅读(7217) 评论(6) 推荐(0) 编辑
摘要:We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2017-03-28 21:07 Grandyang 阅读(7648) 评论(4) 推荐(0) 编辑
摘要:For an integer n, we call k>=2 a good base of n, if all digits of n base k are 1. Now given a string representing n, you should return the smallest go 阅读全文
posted @ 2017-03-26 06:08 Grandyang 阅读(6678) 评论(3) 推荐(0) 编辑
摘要:Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2017-03-26 06:05 Grandyang 阅读(14413) 评论(1) 推荐(0) 编辑
摘要:Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee 阅读全文
posted @ 2017-03-23 21:03 Grandyang 阅读(17772) 评论(12) 推荐(0) 编辑
摘要:Given an m x n binary matrix mat, return the distance of the nearest 0 for each cell. The distance between two adjacent cells is 1. Example 1: Input: 阅读全文
posted @ 2017-03-22 21:49 Grandyang 阅读(19365) 评论(10) 推荐(2) 编辑
摘要:Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus 阅读全文
posted @ 2017-03-20 20:49 Grandyang 阅读(10481) 评论(7) 推荐(1) 编辑
摘要:Given a string and an integer k, you need to reverse the first k characters for every 2k characters counting from the start of the string. If there ar 阅读全文
posted @ 2017-03-19 23:22 Grandyang 阅读(8115) 评论(0) 推荐(0) 编辑
摘要:Given a list of 24-hour clock time points in "Hour:Minutes" format, find the minimum minutes difference between any two time points in the list. Examp 阅读全文
posted @ 2017-03-17 21:20 Grandyang 阅读(5872) 评论(4) 推荐(0) 编辑
摘要:TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http 阅读全文
posted @ 2017-03-16 23:14 Grandyang 阅读(11161) 评论(7) 推荐(0) 编辑
摘要:我之前有一篇博客Convert PLY to VTK Using PCL 1.6.0 or PCL 1.8.0 使用PCL库将PLY格式转为VTK格式展示了如何将PLY格式文件转化为VTK格式的文件,在文章的最后提到了VTK文件保存纹理的两种方式,第一种是需要有texture的图片,然后每个点存储上 阅读全文
posted @ 2017-03-14 09:06 Grandyang 阅读(2604) 评论(0) 推荐(0) 编辑
摘要:When use function 'pcl::io::vtkPolyDataToPointCloud' in PCL 1.6.0, one may have error as follows: This happens because function 'pcl::io::vtkPolyDataT 阅读全文
posted @ 2017-03-14 03:19 Grandyang 阅读(886) 评论(0) 推荐(0) 编辑
摘要:Given an array of integers and an integer k, you need to find the number of unique k-diff pairs in the array. Here a k-diff pair is defined as an inte 阅读全文
posted @ 2017-03-13 21:10 Grandyang 阅读(11168) 评论(2) 推荐(0) 编辑
摘要:Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Note: There are at 阅读全文
posted @ 2017-03-12 23:17 Grandyang 阅读(8636) 评论(2) 推荐(0) 编辑
摘要:Let's play the minesweeper game (Wikipedia, online game)! You are given a 2D char matrix representing the game board. 'M' represents an unrevealed min 阅读全文
posted @ 2017-03-11 23:41 Grandyang 阅读(9851) 评论(3) 推荐(2) 编辑
摘要:Suppose you have N integers from 1 to N. We define a beautiful arrangement as an array that is constructed by these N numbers successfully if one of t 阅读全文
posted @ 2017-03-10 21:57 Grandyang 阅读(10423) 评论(1) 推荐(2) 编辑
摘要:Given a binary array, find the maximum length of a contiguous subarray with equal number of 0 and 1. Example 1: Input: [0,1] Output: 2 Explanation: [0 阅读全文
posted @ 2017-03-10 11:41 Grandyang 阅读(12501) 评论(5) 推荐(0) 编辑
摘要:Given a string s and a string array dictionary, return the longest string in the dictionary that can be formed by deleting some of the given string ch 阅读全文
posted @ 2017-03-08 22:08 Grandyang 阅读(8203) 评论(3) 推荐(0) 编辑
摘要:花了将近一周的时间的,终于在VS2010成功的编译了最新版的3D Slicer 4.7.0,感觉快要崩溃了。Slicer用了20多个外部的库,全都要一起编译,完整编译一次起码要七八个小时,光VS的Output输出窗口有十万多行,复制到txt中,文本内容居然有26MB之多,可怕!经过台式机和笔记本分别 阅读全文
posted @ 2017-03-08 05:35 Grandyang 阅读(2205) 评论(8) 推荐(0) 编辑
摘要:Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be right when one of 阅读全文
posted @ 2017-03-07 08:54 Grandyang 阅读(4793) 评论(0) 推荐(0) 编辑
摘要:Given an integer array nums and an integer k, return true if nums has a continuous subarray of size at least two whose elements sum up to a multiple o 阅读全文
posted @ 2017-03-05 08:25 Grandyang 阅读(17605) 评论(7) 推荐(2) 编辑
摘要:Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input: "bbbab 阅读全文
posted @ 2017-03-02 23:30 Grandyang 阅读(19848) 评论(7) 推荐(1) 编辑

Fork me on GitHub