上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 61 下一页
摘要: 本题要求实现二分查找算法。 函数接口定义: Position BinarySearch( List L, ElementType X ); 其中List结构定义如下: typedef int Position; typedef struct LNode *List; struct LNode { E 阅读全文
posted @ 2020-07-16 11:17 别团等shy哥发育 阅读(20) 评论(0) 推荐(0)
摘要: 本题要求给定二叉树的4种遍历。 函数接口定义: void InorderTraversal( BinTree BT ); void PreorderTraversal( BinTree BT ); void PostorderTraversal( BinTree BT ); void Levelor 阅读全文
posted @ 2020-07-16 11:13 别团等shy哥发育 阅读(24) 评论(0) 推荐(0)
摘要: 本题要求给定二叉树的高度。 函数接口定义: int GetHeight( BinTree BT ); 其中BinTree结构定义如下: typedef struct TNode *Position; typedef Position BinTree; struct TNode{ ElementTyp 阅读全文
posted @ 2020-07-15 11:03 别团等shy哥发育 阅读(25) 评论(0) 推荐(0)
摘要: 本题要求在一个数组中实现两个堆栈。 函数接口定义: Stack CreateStack( int MaxSize ); bool Push( Stack S, ElementType X, int Tag ); ElementType Pop( Stack S, int Tag ); 其中Tag是堆 阅读全文
posted @ 2020-07-15 11:01 别团等shy哥发育 阅读(15) 评论(0) 推荐(0)
摘要: 本题要求实现带头结点的链式表操作集。 函数接口定义: List MakeEmpty(); Position Find( List L, ElementType X ); bool Insert( List L, ElementType X, Position P ); bool Delete( Li 阅读全文
posted @ 2020-07-14 11:31 别团等shy哥发育 阅读(30) 评论(0) 推荐(0)
摘要: 本题要求实现链式表的操作集。 函数接口定义: Position Find( List L, ElementType X ); List Insert( List L, ElementType X, Position P ); List Delete( List L, Position P ); 其中 阅读全文
posted @ 2020-07-14 11:27 别团等shy哥发育 阅读(47) 评论(0) 推荐(0)
摘要: 本题要求实现一个函数,找到并返回链式表的第K个元素。 函数接口定义: ElementType FindKth( List L, int K ); 其中List结构定义如下: typedef struct LNode *PtrToLNode; struct LNode { ElementType Da 阅读全文
posted @ 2020-07-13 19:37 别团等shy哥发育 阅读(23) 评论(0) 推荐(0)
摘要: 函数接口定义: int Length( List L ); 其中List结构定义如下: typedef struct LNode *PtrToLNode; struct LNode { ElementType Data; PtrToLNode Next; }; typedef PtrToLNode 阅读全文
posted @ 2020-07-13 19:34 别团等shy哥发育 阅读(28) 评论(0) 推荐(0)
摘要: 本题要求实现一个函数,计算阶数为n,系数为a[0] … a[n]的多项式f(x)=∑​i=0​n​​(a[i]×x​i​​) 在x点的值。 函数接口定义: double f( int n, double a[], double x ); 其中n是多项式的阶数,a[]中存储系数,x是给定点。函数须返回 阅读全文
posted @ 2020-07-12 23:35 别团等shy哥发育 阅读(67) 评论(0) 推荐(0)
摘要: 本题要求实现一个函数,将给定的单链表逆转。 函数接口定义: List Reverse( List L ); 其中List结构定义如下: typedef struct Node *PtrToNode; struct Node { ElementType Data; /* 存储结点数据 */ PtrTo 阅读全文
posted @ 2020-07-12 23:32 别团等shy哥发育 阅读(21) 评论(0) 推荐(0)
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 61 下一页