摘要: Maximum Subsequence Sum Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​, ...,  阅读全文
posted @ 2021-05-26 22:11 onlyblues 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 最大子列和问题 给定K个整数组成的序列{ N​1​​, N​2​​, ..., N​K​​ },“连续子列”被定义为{ N​i​​, N​i+1​​, ..., N​j​​ },其中1 ≤ i ≤ j ≤ K。“最大子列和”则被定义为所有连续子列元素的和中最大者。例如给定序列{ -2, 11, -4 阅读全文
posted @ 2021-05-26 22:02 onlyblues 阅读(787) 评论(0) 推荐(0) 编辑
摘要: 二叉搜索树的操作集 本题要求实现给定二叉搜索树的5种常用操作。 函数接口定义: BinTree Insert( BinTree BST, ElementType X ); BinTree Delete( BinTree BST, ElementType X ); Position Find( Bin 阅读全文
posted @ 2021-05-26 21:55 onlyblues 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 两个有序链表序列的合并 本题要求实现一个函数,将两个链表表示的递增整数序列合并为一个非递减的整数序列。 函数接口定义: List Merge( List L1, List L2 ); 其中 List 结构定义如下: typedef struct Node *PtrToNode; struct Nod 阅读全文
posted @ 2021-05-26 21:51 onlyblues 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 二分查找 本题要求实现二分查找算法。 函数接口定义: Position BinarySearch( List L, ElementType X ); 其中 List 结构定义如下: typedef int Position; typedef struct LNode *List; struct LN 阅读全文
posted @ 2021-05-26 21:47 onlyblues 阅读(360) 评论(0) 推荐(0) 编辑
Web Analytics