自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Search Insert Position

Search Insert Position递归实现二分搜索。将基本情况写下来,在写出递归式,总觉得代码又长又臭int searchInsert(int* nums, int numsSize, int target) { if(nums==NULL||target<*nums) return 0; if(target>*(nums+numsSize-1))

2015-06-18 15:19:40 387

原创 构建一个二叉堆实例

学习了堆知识,自己构建了一个二叉堆实例/*二叉堆的实现*/ #include<stdio.h> #include<stdlib.h> struct heap; typedef struct heap* Heap; struct heap { int size; int capicity; int *arr; }; /*二叉堆初始化*/ Heap creatheap(in

2015-05-12 21:42:05 450

原创 欢迎使用CSDN-markdown编辑器

哈希表的创建,以及一个使用实例,基础太薄弱了,哈希表都写了好久,代码书写要更流畅和易读。/*哈希表的实现,采用分离链接法*/ #include<stdio.h> #include<stdlib.h> #include"try.h" /*struct listNode; typedef struct listNode* Postion; struct listNode { int val

2015-05-11 22:38:59 205

原创 队列的实现C语言

先用数组实现队列 ,注意变量的初始化。 #include #include typedef struct  { int capacity; int size; int front; int rear; int *Array; }Queue; Queue *CreatQueue(Queue *queue); void Enqueue(Queue *queue,int

2015-04-20 19:33:03 358

原创 链表的实现(C语言)__一步一步来

开学一直在学校数据结构,一直看菜谱,都不知道自己炒出来什么味道。 /*创建链表,实现非零整数入链并读取链表*/ #include #include //声明结构类型 typedef struct Node { int val; struct Node *next; }Node; //函数声明,返回类型为Node *   Node *create

2015-04-17 21:13:42 291

空空如也

空空如也

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

TA关注的人

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