自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 资源 (2)
  • 收藏
  • 关注

转载 Dijkstra算法步骤及代码

转载自:http://www.cnblogs.com/dolphin0520/archive/2011/08/26/2155202.html动画演示:http://www.ntnoi.cn/FLASH/arithmetic/2010-05-17/23.html    http://baike.baidu.com/view/1712262.htm 单源最短路径问题,即在图中求出给定顶

2015-02-23 00:39:07 11031

转载 二叉树的深度优先与广度优先遍历

来自:http://www.blogjava.net/fancydeepin/archive/2013/02/03/395073.html(第一:这里注意程序中对树的深度优先遍历与对图的深度优先遍历的区别;第二:注意使用深度优先与广度优先方法可以使用迭代的方法进行实现,也可以使用堆栈和队列对算法进行辅助。)深度优先搜索算法(Depth First Search),是搜索算法

2015-02-22 20:27:42 495

翻译 算法导论:动态规划

top-down实现#include #include #include using namespace std;int cutRod(int* p, int n){ if(n==0) return 0; int q = INT_MIN; for(int i=1;i<=n;i++) { q=max(q,p[i-1]+c

2015-02-14 12:43:55 546

转载 LeetCode:Merge k Sorted Lists

Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.主要参考一下博客:http://blog.csdn.net/kenden23/article/details/13274385http://blog.csdn.net/a836

2015-02-12 20:37:19 297

转载 LeetCode:Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2015-02-12 17:04:46 418

翻译 算法导论:快速排序代码

#include using namespace std;void exchange(int& a, int& b){ int temp; temp = a; a = b; b = temp;}int part(int* a,int p,int r){ int x = a[r]; int i = p-1; for(int j

2015-02-12 08:24:27 341

转载 LeetCode: Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] ha

2015-02-09 18:57:32 252

转载 算法导论:分治策略__最大子数组问题

可以参考http://segmentfault.com/blog/binta/1190000000733277//参考书上源代码,但是对于分治法求解,返回子数组范围在一些情况下有一些问题。// 求最大子数组 暴力法与分治法#include #include #include using namespace std;// 暴力求解法int maxsubset(int* a

2015-02-09 18:17:36 299

转载 Leetcode: Binary Tree Preorder Inooder Traversal

Given a binary tree, return the preorder traversal of its nodes' values./** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; *

2015-02-07 20:06:33 257

转载 LeetCode:Maximum Depth of Binary Tree

转载自 http://www.cnblogs.com/bakari/p/4126693.html要求:求二叉树的深度(二叉树的深度为最远叶子节点到根节点的距离,即根节点到最远叶子节点的距离)Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along th

2015-02-07 12:47:37 261

OpenGL超级宝典第六版 英文

OpenGL超级宝典 作 者:赖特 RichardS Wright Jr 是OpenGL及3D图形编程最好的入门指南 涵盖了使用最新版本的OpenGL进行编程所需要的主要知识

2014-10-03

飞扬的小鸟 matlab程序

飞扬的小鸟在当时是一个非常流行的手机游戏,但是程序非常简单,现在有人使用matlab编写了这个游戏,方便大家学习。

2014-08-18

空空如也

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

TA关注的人

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