自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 收藏
  • 关注

原创 按法定v

#include #include using namespace std; void HeapAdjust(int *a,int i,int size) //调整堆 { int lchild=2*i; //i的左孩子节点序号 int rchild=2*i+1; //i的右孩子节点序号 int max=i; //临时变量

2015-02-05 11:44:40 336

原创 先成长性

#include #include using namespace std; void HeapAdjust(int *a,int i,int size) //调整堆 { int lchild=2*i; //i的左孩子节点序号 int rchild=2*i+1; //i的右孩子节点序号 int max=i; //临时变量

2015-02-05 11:35:15 420

原创 leetcode:Minimum Depth of Binary Tree

Minimum Depth of Binary Tree https://oj.leetcode.com/problems/minimum-depth-of-binary-tree/

2014-10-20 15:58:24 377

原创 leetcode:Pascal's Triangle

https://oj.leetcode.com/problems/pascals-triangle/

2014-10-20 15:38:03 288

原创 leetcode:Sum Root to Leaf Numbers (二叉树的DFS)

Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 which represents the number 123. Find the tota

2014-09-24 10:06:54 341

转载 Reverse Polish Notation.逆波兰表达式,笔记

逆波兰表达式,它的语法规定,表达式必须以逆波兰表达式的方式给出。逆波兰表达式又叫做后缀表达式。这个知识点在数据结构和编译原理这两门课程中都有介绍,下面是一些例子: 正常的表达式 逆波兰表达式 a+b ---> a,b,+ a+(b-c) ---> a,b,c,-,+ a+(b-c)*d ---> a,b,c,-,d,*,+ a+d*(b-c)--->a,d,b,c,-

2014-09-17 17:24:58 432

原创 leetcode:Combinations (太难了,递归,不会写)

不会写,改天写

2014-09-17 17:10:20 608

原创 leetcode:same tree

用递归; 总结的结果是,如果后边有重复的相同的操作的时候

2014-09-17 16:41:56 319

原创 leetcode:Binary Tree Level Order Traversal 【队列与二叉树y】

Binary Tree Level Order Traversal  Total Accepted: 21894 Total Submissions: 70908My Submissions Given a binary tree, return the level order traversal of its nodes' values. (ie, from left t

2014-09-17 15:58:57 331

原创 leetcode【二维数组】:Triangle (最主要的算法思路)

Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3,4], [

2014-09-16 11:09:13 483

原创 LeetCode【位运算】:Single Number

很容易写出时间复杂度为o(n2)的代码,就不贴了。

2014-09-15 20:23:30 307

原创 Leetcode【二叉树】:Binary Tree Postorder Traversal 题解(非递归解法),可以说是【二叉树】入门必须掌握

Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1]. Note: Recursive solut

2014-09-15 17:14:27 351

原创 Leetcode【字符串】: Reverse Words in a String 要点分析

1,这是开博客的第一篇文章,也是我到北航学习的第一天,再到北京的火车上就给自己

2014-09-14 14:38:52 426

空空如也

空空如也

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

TA关注的人

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