自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 数据结构——二叉树建树与遍历

从mooc上看到一张很好的图,说明了前序遍历,中序遍历,后序遍历之间的关系。(1)先序遍历 如果二叉树不为空,访问根节点,前序遍历左子树,前序遍历右子树,如上图×号。//先序遍历 void PreOrderTree(BinTreeNode *root) { if(root) { cout<<root->data<<" "; PreOrderTree(

2017-03-22 20:08:19 742

原创 最长上升子序列(LIS) -最长公共子序列(LCS)

我们可以发现,求整个序列的最长上升子序列长度的子问题是“求以ak(k=1, 2, 3…N)为终点的最长上升子序列的长度”。 我们用max_len(k)表示以ak作为终点的最长上升子序列的长度。 初始状态:max_len(1)=1; 状态转移方程:max_len(k) = max{max_len(i) 1&lt;=i &lt; k 且 ai &lt; ak且 k≠1 } + 1; 若没有符...

2017-03-21 20:04:54 468

原创 Valid Parentheses(用栈实现括号匹配)

问题描述: 输入一行括号 只包括’(’ ‘)’ ‘{’ ‘}’ ‘[’ ‘]’ 如果该字符串中所含的括号是配对的,则输出Yes,如果不配对则输出No。#include <iostream> #include <stack>using namespace std;char change(char i) { if(i == ')') return '('; if(i

2017-03-12 17:04:16 414

原创 数据结构--用C实现链式队列

#include <stdio.h> #include <stdlib.h>typedef struct node { int data; struct node *next; } Node; typedef struct queue { struct node *top; struct node *tail; } Queue;int gettop(struct qu

2017-03-12 15:27:25 353

原创 数据结构 -- 用C实现链式栈

#include <stdio.h> #include <stdlib.h>struct node { int data; struct node *next; }Stack;int gettop(struct node *top) { return top -> data; }struct node * push(struct node *top,int x ) {

2017-03-12 11:27:11 356

原创 HDU 2072 STL

#include <iostream> #include <set> #include <string> #include <sstream>using namespace std;int main() { string str,word; while(getline(cin,str) && str != "#") { istringstream stream

2017-03-02 15:27:26 315

QT简易计算器源码

基于qt5.9和数据结构中表达式计算一节开发,部分代码来源自网络,侵删。

2018-01-13

灰度变换小工具

基于QT5.9和Opencv3.2开发,可实现分段线性灰度变换和对数变换,希望可以给我提一点意见。

2018-01-13

空空如也

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

TA关注的人

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