上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页
摘要: 题目描述: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given 阅读全文
posted @ 2016-01-27 21:32 scottwang 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Return [1,3,3,1]. 解题思路: 每次在上一个list前面插入1,然后后面的每两个间相加赋值给前一 阅读全文
posted @ 2016-01-27 21:09 scottwang 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 题目描述:Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{... 阅读全文
posted @ 2016-01-25 23:18 scottwang 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 题目描述:Given an integern, return the number of trailing zeroes inn!.Note:Your solution should be in logarithmic time complexity.解题思路:对于阶乘而言,也就是1*2*3*...... 阅读全文
posted @ 2016-01-24 21:44 scottwang 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://blog.csdn.net/zhongkejingwang/article/details/43053513 在网上看到有很多文章介绍SVD的,讲的也都不错,但是感觉还是有需要补充的,特别是关于矩阵和映射之间的对应关系。前段时间看了国外的一篇文章,叫A Singularly V 阅读全文
posted @ 2016-01-23 22:29 scottwang 阅读(365) 评论(0) 推荐(0) 编辑
摘要: 题目描述:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6... 阅读全文
posted @ 2016-01-22 14:19 scottwang 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 题目描述:Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit ... 阅读全文
posted @ 2016-01-21 22:44 scottwang 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 题目描述:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).Fo... 阅读全文
posted @ 2016-01-21 22:06 scottwang 阅读(1221) 评论(0) 推荐(0) 编辑
摘要: 题目描述:Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and no... 阅读全文
posted @ 2016-01-20 14:15 scottwang 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 题目描述:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stoppi... 阅读全文
posted @ 2016-01-13 19:38 scottwang 阅读(148) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页