摘要: Single NumberGiven an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runti... 阅读全文
posted @ 2015-08-17 23:36 `Liok 阅读(604) 评论(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-17 00:24 `Liok 阅读(772) 评论(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-17 00:11 `Liok 阅读(460) 评论(0) 推荐(0) 编辑