摘要: Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, 阅读全文
posted @ 2021-05-16 21:56 keiiha 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 设计函数分别求两个一元多项式的乘积与和。 输入格式: 输入分2行,每行分别先给出多项式非零项的个数,再以指数递降方式输入一个多项式非零项系数和指数(绝对值均为不超过1000的整数)。数字间以空格分隔。 输出格式: 输出分2行,分别以指数递降方式输出乘积多项式以及和多项式非零项的系数和指数。数字间以空 阅读全文
posted @ 2021-05-16 20:02 keiiha 阅读(76) 评论(0) 推荐(0) 编辑
摘要: 给定K个整数组成的序列{ N​1​​, N​2​​, ..., N​K​​ },“连续子列”被定义为{ N​i​​, N​i+1​​, ..., N​j​​ },其中 1≤i≤j≤K。“最大子列和”则被定义为所有连续子列元素的和中最大者。例如给定序列{ -2, 11, -4, 13, -5, -2 阅读全文
posted @ 2021-05-16 15:54 keiiha 阅读(109) 评论(0) 推荐(0) 编辑
摘要: Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​, ..., N​j​​ } where 1≤i≤j≤K. T 阅读全文
posted @ 2021-05-16 15:51 keiiha 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 本题要求实现给定二叉搜索树的5种常用操作。 函数接口定义: BinTree Insert( BinTree BST, ElementType X ); BinTree Delete( BinTree BST, ElementType X ); Position Find( BinTree BST, 阅读全文
posted @ 2021-05-16 02:26 keiiha 阅读(162) 评论(0) 推荐(0) 编辑