摘要: 求最长公共 子序列,只是必须先对输入数据执行cin >>x; str[x] = i;的操作。 Given the correct chronological order of n events as where denotes the ranking of event i in the ... 阅读全文
posted @ 2013-03-23 20:13 N3verL4nd 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 假设有两个按元素值递增有序排列的线性表A和B,均以单链表作存储结构,请编写算法将A表和B表归并为一个按元素值递增 有序(即非递增有序,允许表中含有值相同的元素)排列的线性表C,并要求利用原装(即A表和B表)的结点空间构造C表。 采用的方法: 尾插法 #include #include #inc... 阅读全文
posted @ 2013-03-23 10:50 N3verL4nd 阅读(2493) 评论(0) 推荐(0) 编辑