自定义博客皮肤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)
  • 收藏
  • 关注

原创 剑指offer 题目总结(上)

1.反转链表 通过三个指针实现链表反转,还可以通过栈实现  ListNode* ReverseList(ListNode* pHead) {         if(pHead==NULL)             return NULL;         if(pHead->next==NULL)             return pHead;         ListNode*

2017-01-13 13:04:28 255

原创 二叉树的建立 前序中序后序递归遍历及非递归遍历

#include   #include #include #include #include #include #include using namespace std; struct TreeNode { char val; TreeNode *left; TreeNode *right; }; int i = 1; TreeNode* create(){ Tree

2016-11-24 10:20:44 424

原创 七种排序算法*

冒泡排序 void MaoPao(int *a, int len){ for (int i = 0; i for (int j = 0; j { if (a[j]>a[j + 1]) swap(a[j], a[j + 1]); } } 选择排序 void SelectSort(int *a, int len){ for (int i = 0; i { int k

2016-11-18 13:54:33 239

原创 继承多态与虚函数及对类的理解

B是A的子类,子类会继承父类的public方法,子类对象可以调用父类的public接口,但是子类和父类函数重名时,父类的方法会被子类覆盖(隐藏),子类调用和父类同名同参函数或者重载父类的函数后不可以直接调用父类函数,需要加A::fun()调用,父类的protect方法只在继承中有效,子类可以调用父类的protect方法,但是外部无法访问,所以在非继承关系中pretect与private等同,pri

2016-11-17 13:41:30 1197 1

原创 背包问题和八皇后问题

#include   #include #include #include #include using namespace std; #define N 5 #define M 5 unsigned int f[100] ; int main() {     int weight[6] = { 0, 2, 2, 3, 4, 5 }; int value[6] =

2016-11-17 12:41:38 290

空空如也

空空如也

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

TA关注的人

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