==数据结构==
林次次
Life is short, use Python.
展开
-
NYOJ 17:单调递增最长子序列【二分】
单调递增最长子序列 时间限制:3000 ms | 内存限制:65535 KB 难度:4 描述 求一个字符串的最长递增子序列的长度 如:dabdbf最长递增子序列就是abdf,长度为4 输入第一行一个整数0 随后的n行,每行有一个字符串,该字符串的长度不会超过10000输出输出字符串的最长递增子序列的长度样例输入 3 aaa ababc abklmncde原创 2015-08-15 15:40:30 · 619 阅读 · 0 评论 -
MOOC :01-复杂度2 Maximum Subsequence Sum
01-复杂度2 Maximum Subsequence Sum (25分) Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1≤i原创 2015-10-07 21:55:40 · 2341 阅读 · 0 评论 -
MOOC:01-复杂度1 最大子列和问题
最大子列和问题 给定K个整数组成的序列{ N1, N2, ..., NK },“连续子列”被定义为{ Ni, Ni+1, ..., Nj },其中 1≤i≤j≤K。“最大子列和”则被定义为所有连续子列元素的和中最大者。例如给定序列{ -2, 11, -4, 13, -5, -2 },其连续子列{ 11, -4, 13 }有最大的和原创 2015-09-25 16:28:13 · 560 阅读 · 0 评论 -
有序线性表的基本操作及实现
#include using namespace std; #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef int Status; typedef int ElemType; #define MAXSIZE 100 typedef struct { ElemType *elem; int lenth; }Sqlist; ty原创 2016-04-25 22:03:30 · 1566 阅读 · 0 评论 -
线性表的基本实现与操作
#include using namespace std; #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef int Status; typedef int ElemType; #define MAXSIZE 100 typedef struct { ElemType *elem; int lenth; }Sqlist; ty原创 2016-04-16 13:24:32 · 466 阅读 · 0 评论 -
有序链表的归并
#include using namespace std; typedef struct LNode //定义单链表 { int data; struct LNode *next; }LNode,*LinkList; void InitList_L(LinkList &L) //创建单链表 { L=new LNode; L->next=NULL; }原创 2016-04-16 13:27:06 · 573 阅读 · 0 评论 -
舞伴配对问题
#include #include using namespace std; #define MAXQSIZE 100 #define OK 1 #define ERROR 0 #define OVERFLOW -2 typedef int Status; typedef struct{ char name[20]; char sex; }Person; typedef Person Q原创 2016-05-01 21:02:54 · 3378 阅读 · 0 评论