08 2015 档案

摘要:Missing NumberGiven an array containingndistinct numbers taken from0, 1, 2, ..., n, find the one that is missing from the array.For example,Givennums=... 阅读全文
posted @ 2015-08-25 22:20 陆草纯 阅读(1791) 评论(0) 推荐(0) 编辑
摘要:Ugly Number IIWrite a program to find then-th ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For example,1, 2,... 阅读全文
posted @ 2015-08-22 12:13 陆草纯 阅读(543) 评论(0) 推荐(0) 编辑
摘要:Add DigitsGiven a non-negative integernum, repeatedly add all its digits until the result has only one digit.For example:Givennum = 38, the process is... 阅读全文
posted @ 2015-08-22 11:52 陆草纯 阅读(1111) 评论(0) 推荐(0) 编辑
摘要:Binary Tree PathsGiven a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-lea... 阅读全文
posted @ 2015-08-22 11:31 陆草纯 阅读(2235) 评论(0) 推荐(0) 编辑
摘要:Ugly NumberWrite a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5... 阅读全文
posted @ 2015-08-20 21:38 陆草纯 阅读(997) 评论(0) 推荐(0) 编辑
摘要:Valid AnagramGiven two stringssandt, write a function to determine iftis an anagram ofs.For example,s= "anagram",t= "nagaram", return true.s= "rat",t=... 阅读全文
posted @ 2015-08-01 21:38 陆草纯 阅读(6280) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示