自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Albert__Sun的博客

见证你的努力!

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

原创 用循环和栈代替递归Demo

用循环和栈代替递归DemoQ:将上图的数据结构转换为如下要求:循环中嵌套递归:public function recursion($arr, $str){ for($i = 0; $i < count($arr); $i++){ $newstr = $str + '->'+ $arr[$i]['resource_n

2016-06-12 14:46:09 1407

原创 动态规划-最大连续乘积子数组

最大连续乘积子序列#include #define LENGTH 8#define min(n1, n2) (n1 > n2 ? n2 : n1)#define max(n1, n2) (n1 > n2 ? n1 : n2)double MaxProSub(double a[], int length);int main(){ double arr[LENGTH] = {-2.5, 4,

2016-06-08 16:50:29 968

原创 从八皇后问题到回溯法

八皇后问题-->回溯法,待补充

2016-03-16 10:06:21 323

原创 从爬楼梯到动态规划

http://mp.weixin.qq.com/s?__biz=MzI2NjA3NTc4Ng==&mid=402962373&idx=1&sn=15589545f7072583d0f65f2f6b1f3840&scene=23&srcid=0315hG6Qnn14H0VOTjinKZCr#rd

2016-03-16 10:02:51 514

原创 数组index

1. 数组index与数组名的位置关系     a[b] = *(a + b) = *(b + a) = b[a] int a[5] = {1, 2, 3, 4, 5}; printf("%d\n", 3[a]); putchar(2["abcdf"]);输出分别为 4 和 c

2016-03-11 10:38:06 696

原创 图的深度搜索和广度搜索

#include #include #include #include "queue.h"typedef struct _graph_node_ { int data; struct _graph_node_ *next;}gnode_t;typedef struct _adjlist_graph_ { gnode_t *relation; int vn; char *v

2016-03-10 22:18:10 758

原创 回溯法求解素数环

#include#include#define n 16int num = 0;int A[n] = {0};int isp[n*2] = {0};int vis[n] = {0};void dfs(int cur){ int i; if(cur == n && isp[A[0] + A[n-1]]){ //递归边界。测试第一个数和最后一个数

2016-03-10 22:16:15 1018

空空如也

空空如也

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

TA关注的人

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