摘要: http://blog.csdn.net/xiaoch1222/article/details/53510895 阅读全文
posted @ 2017-04-07 19:01 世人谓我恋长安 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 110. Balanced Binary Tree Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a bin 阅读全文
posted @ 2017-03-31 20:14 世人谓我恋长安 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 415. Add Strings Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: java代码: 阅读全文
posted @ 2017-03-31 19:34 世人谓我恋长安 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 401. Binary Watch java代码: 阅读全文
posted @ 2017-03-29 17:39 世人谓我恋长安 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 189. Rotate Array Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5 阅读全文
posted @ 2017-03-29 17:00 世人谓我恋长安 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 100. Same Tree Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structura 阅读全文
posted @ 2017-03-24 22:31 世人谓我恋长安 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 404. Sum of Left Leaves Find the sum of all left leaves in a given binary tree. Example: 阅读全文
posted @ 2017-03-23 22:24 世人谓我恋长安 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 建议不要安装3.0以上版本,但是2.4.10版本又不支持gpu,真TM坑爹,应该可以用2.4.12版本。我装的是cuda8.0+opencv2.4.13 1、首先下载opencv2.4.12版本 http://opencv.org/downloads.html 2、安装依赖包 3、build ope 阅读全文
posted @ 2017-03-22 22:22 世人谓我恋长安 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. 要求一个字符串数组里面最长公共前缀字符串(数组里面所有字符串) 一开始求成 阅读全文
posted @ 2017-03-22 21:51 世人谓我恋长安 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 476. Number Complement Example 1: Example 2: 求一个数的补码。 另一种解法: 举个例子:100110, 它的补码是 011001, 和是 111111. 所以我们先求和num的二进制长度相同全为一的数,然后做减法 阅读全文
posted @ 2017-03-22 15:14 世人谓我恋长安 阅读(194) 评论(0) 推荐(0) 编辑