自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Faldict的博客

二的五十六次方

  • 博客(4)
  • 收藏
  • 关注

原创 leetcode#105 Construct Binary Tree from Preorder and Inorder Traversal

Desciption Given preorder and inorder traversal of a tree, construct the binary tree.这道题很简单,先序的第一个元素就是根元素,然后在中序中找到对应的位置,则左边的就是左子树,右边的即为右子树。值得注意的是,C++切片操作很难用,所以我就用Go写的解答。最后大部分debug时间都在解决语法问题T_TSoluti

2017-03-28 18:54:29 277

原创 leetcode#224 Basic Calculator

题目描述: Implement a basic calculator to evaluate a simple expression string. The expression string may contain open ( and closing parentheses ), the plus + or >minus sign -, non-negative integers

2017-03-23 15:35:31 370

原创 leetcode#94

Given a binary tree, return the inorder traversal of its nodes’ values. 给定一棵二叉树,返回它的中序遍历直接递归解决就可以了,没什么好说的。需要注意的是检查节点值是否为空。/** * Definition for a binary tree node. * struct TreeNode { * int v

2017-03-19 21:38:51 303

原创 leetcode#101 Symmetric Tree

Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmetric But the following [1,2,2,null,3,null,3] i

2017-03-14 19:04:10 289

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除