摘要: Given numRows, generate the first numRows of Pascal's triangle. For example, given numRows = 5, Return 阅读全文
posted @ 2015-06-15 11:06 Mr.do 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Invert a binary tree. to Trivia: This problem was inspired by this original tweet by Max Howell: 阅读全文
posted @ 2015-06-13 15:12 Mr.do 阅读(104) 评论(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 is a 阅读全文
posted @ 2015-06-12 10:22 Mr.do 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Write a function to find the longest common prefix string amongst an array of strings. 阅读全文
posted @ 2015-06-11 19:54 Mr.do 阅读(118) 评论(0) 推荐(0) 编辑
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 阅读全文
posted @ 2015-06-10 18:39 Mr.do 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 阅读全文
posted @ 2015-06-09 13:03 Mr.do 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string. If the last word 阅读全文
posted @ 2015-06-07 10:38 Mr.do 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 排序方法: 测试main函数: 方法对比: B是真数(0-9), R是基数(个十百) 阅读全文
posted @ 2015-05-10 21:29 Mr.do 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionary words. For 阅读全文
posted @ 2015-05-10 15:32 Mr.do 阅读(122) 评论(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 stopping yo 阅读全文
posted @ 2015-05-04 11:10 Mr.do 阅读(166) 评论(0) 推荐(0) 编辑