
c/c++
码上的生活
Don't you want to take a leap of faith? Or become an old man, filled with regret ?
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
重建二叉树
剑指offer 题目题目描述输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并返回。//// Created by knight on 16-4-21.前序中的第一个数是根节点,找到中序中的这个节点划分左右子树。//原创 2016-04-21 17:05:40 · 524 阅读 · 0 评论 -
[leetcode] 8. String to Integer (atoi)
Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.N原创 2016-04-19 21:14:56 · 481 阅读 · 0 评论 -
[leetcode] 9 Palindrome Number
https://leetcode.com/problems/palindrome-number/Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints: Could negative integers be palindromes? (ie原创 2016-04-21 16:57:44 · 427 阅读 · 0 评论