摘要: >Given an integer n, count the total number of digit 1 appearing in all non-negative integers less than or equal to n.>For example:>Given n = 13,>Retu... 阅读全文
posted @ 2015-07-11 20:37 卖程序的小歪 阅读(180) 评论(0) 推荐(0) 编辑
摘要: >Given a singly linked list, determine if it is a palindrome.>Follow up:>Could you do it in O(n) time and O(1) space?```/** * Definition for singly-li... 阅读全文
posted @ 2015-07-11 19:49 卖程序的小歪 阅读(214) 评论(0) 推荐(0) 编辑
摘要: >Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.>According to the definition of LCA on Wikipedi... 阅读全文
posted @ 2015-07-11 19:33 卖程序的小歪 阅读(142) 评论(0) 推荐(0) 编辑